Browse Source

Fixes #1520 Issue when using named popup in different offset container

pull/1550/head
jlukic 10 years ago
parent
commit
096f44a1c7
3 changed files with 13 additions and 3 deletions
  1. 2
      RELEASE-NOTES.md
  2. 13
      src/definitions/modules/popup.js
  3. 1
      src/definitions/modules/popup.less

2
RELEASE-NOTES.md

@ -9,10 +9,12 @@
**Enhancements*
- **Label** - ``ui ribbon label`` can now appear on the right side of content when specifying ``ui right ribbon label``
- **Progress** - Progress bars now display all intermediary percentage values when animating. Improved performance when progress bar is rapidly updated.
- **Popup** - Popup now uses the new property ``min-width: max-content`` to allow for better display with ``inline`` in some circumstances where it escapes parent element.
**Bugs**
- **Dropdown/Search** - Fixed issues with ``ui search`` and ``ui search dropdown`` using ``RegExp test`` which [advances pointer on match](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test) causing results to display incorrectly
- **Form** - ``ui input`` now receives the same formatting as a normal input inside an ``inline field``
- **Popup** - Popup now moves to the same offset context to avoid positioning errors when using a named pre-existing popup.
### Version 1.4.1 - December 23, 2014

13
src/definitions/modules/popup.js

@ -116,13 +116,20 @@ $.fn.popup = function(parameters) {
}
if(settings.popup) {
$popup.addClass(className.loading);
$offsetParent = $popup.offsetParent();
if($popup.offsetParent()[0] !== $module.offsetParent()[0]) {
module.debug('Moving popup to the same offset parent as activating element');
$offsetParent = $module.offsetParent();
$popup
.detach()
.appendTo($offsetParent)
;
}
$popup.removeClass(className.loading);
}
else {
$offsetParent = (settings.inline)
? $target.offsetParent()
: $body
? $target.offsetParent()
: $body
;
}
if( $offsetParent.is('html') ) {

1
src/definitions/modules/popup.less

@ -30,6 +30,7 @@
z-index: @zIndex;
border: @border;
min-width: max-content;
max-width: @maxWidth;
background-color: @background;

Loading…
Cancel
Save