diff --git a/src/definitions/modules/modal.less b/src/definitions/modules/modal.less index 9407a84b9..ac4f8d357 100755 --- a/src/definitions/modules/modal.less +++ b/src/definitions/modules/modal.less @@ -25,7 +25,7 @@ .ui.modal { display: none; position: fixed; - z-index: 1001; + z-index: @zIndex; top: 50%; left: 50%; diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 8b9a7cbd3..0827ac34e 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -103,18 +103,18 @@ $.fn.popup = function(parameters) { refresh: function() { if(settings.popup) { - $popup = $(settings.popup); + $popup = $(settings.popup).eq(0); } else { if(settings.inline) { - $popup = $target.next(selector.popup); + $popup = $target.next(selector.popup).eq(0); } } if(settings.popup) { $popup.addClass(className.loading); $offsetParent = module.get.offsetParent(); $popup.removeClass(className.loading); - if(module.has.popup() && module.get.offsetParent($popup)[0] !== $offsetParent[0]) { + 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'); $popup .detach() @@ -1087,6 +1087,7 @@ $.fn.popup.settings = { }, setFluidWidth : true, + movePopup : true, target : false, popup : false, diff --git a/src/definitions/modules/popup.less b/src/definitions/modules/popup.less index 6985a620c..bd930bbb1 100755 --- a/src/definitions/modules/popup.less +++ b/src/definitions/modules/popup.less @@ -18,6 +18,7 @@ @import '../../theme.config'; + /******************************* Popup *******************************/ @@ -27,6 +28,10 @@ position: absolute; top: 0px; right: 0px; + + /* Fixes content being squished when inline (moz only) */ + min-width: -moz-max-content; + z-index: @zIndex; border: @border; diff --git a/src/themes/default/modules/modal.variables b/src/themes/default/modules/modal.variables index 22364cedc..7d0c14b08 100644 --- a/src/themes/default/modules/modal.variables +++ b/src/themes/default/modules/modal.variables @@ -5,6 +5,7 @@ @background: @white; @border: none; @width: 90%; +@zIndex: 1001; @xOffset: -(@width / 2); @borderRadius: @defaultBorderRadius; @boxShadow: 0 1px 4px 1px rgba(0, 0, 0, 0.3); diff --git a/src/themes/default/modules/popup.variables b/src/themes/default/modules/popup.variables index 4ed18a43d..ce26f0e8c 100644 --- a/src/themes/default/modules/popup.variables +++ b/src/themes/default/modules/popup.variables @@ -6,7 +6,7 @@ Element --------------------*/ -@zIndex: 900; +@zIndex: 1900; @background: @white; @maxWidth: 250px; @@ -60,8 +60,8 @@ Coupling --------------------*/ -/* (padding * @medium) */ -@nestedGridMargin: -0.7rem -0.875rem; +/* Grid Inside Popup */ +@nestedGridMargin: -0.7rem -0.875rem; /* (padding * @medium) */ @nestedGridWidth: ~"calc(100% + 1.75rem)"; /*-------------------