Browse Source

Fix issue with not being passed to offsetContext when using predefined popup

pull/4108/merge
Jack 7 years ago
parent
commit
6e6c92a479
2 changed files with 4 additions and 3 deletions
  1. 1
      RELEASE-NOTES.md
  2. 6
      src/definitions/modules/popup.js

1
RELEASE-NOTES.md

@ -15,6 +15,7 @@
- **Sticky** - Fixed edge case where using `offset` setting, sticky element would not internally scroll if the rail contents (without the offset setting) would fit on screen
- **Form Validation** - Fixed issue where radio was not being included in `onFailure` values if not set #5064
- **Menu** - Fixed issue where `left menu` and `right menu` did not display correctly in `stackable menu` on mobile #3604 #5116 **Thanks @BleuDiamant @Traverse**
- **Popup** - Fixed issue where popup would incorrectly add itself to the wrong offset context when using `popup` and `target` setting together in cases where the `target` has a different `offsetParent` than the activating element.
- **Dimmer** - Fixed typo causing body dimmer to add unnecessary `position: relative;` **Thanks @jinyangzhen** #4707
### Version 2.2.10 - March 28, 2017

6
src/definitions/modules/popup.js

@ -125,10 +125,10 @@ $.fn.popup = function(parameters) {
}
if(settings.popup) {
$popup.addClass(className.loading);
$offsetParent = module.get.offsetParent();
$offsetParent = module.get.offsetParent($target);
$popup.removeClass(className.loading);
if(settings.movePopup && module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) {
module.debug('Moving popup to the same offset parent as activating element');
module.debug('Moving popup to the same offset parent as target');
$popup
.detach()
.appendTo($offsetParent)
@ -139,7 +139,7 @@ $.fn.popup = function(parameters) {
$offsetParent = (settings.inline)
? module.get.offsetParent($target)
: module.has.popup()
? module.get.offsetParent($popup)
? module.get.offsetParent($target)
: $body
;
}

Loading…
Cancel
Save