From 3827fd0a82ec4303874faf16439ffaa3a806540b Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 19 Feb 2018 19:09:56 -0800 Subject: [PATCH] Fix eventNamespace in #3396 --- RELEASE-NOTES.md | 2 +- src/definitions/modules/modal.js | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index b942c1fe1..a687c754f 100755 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -33,7 +33,7 @@ - **Popup** - Popup can now position elements correctly even when they have a different offset context than their activating element. Like in [this example](https://jsfiddle.net/g853mc03/). -To preserve functionality `movePopup` has remained as `true` (moving the popup to the same offset context), however now setting `movePopup: false` should in all cases position correctly, helping prevent sticky inheritance issues caused by moving the DOM tree around. +To preserve functionality `movePopup` default has remained as `true` (moving the popup to the same offset context), however now setting `movePopup: false` should now always position correctly. Be sure to use `movePopup: true` to avoid issues with `ui popup` inside `menu`, `input` or other places where it may inherit rules from its activating element or its context. - **Modal** - Modal has been rewritten to use `flexbox`. No need to call `refresh()` to recalculate vertical centering. - **Modal** - Modals now have a setting `centered` which can be used to disable vertical centering. This can be useful for modals with content that changes dynamically to prevent content from jumping in position. diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 8d3d564a0..66ce70d30 100755 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -109,7 +109,7 @@ $.fn.modal = function(parameters) { defaultSettings = { debug : settings.debug, variation : settings.centered - ? '' + ? false : 'top aligned' , dimmerName : 'modals' @@ -515,7 +515,7 @@ $.fn.modal = function(parameters) { }, clickaway: function() { $dimmer - .off('click' + elementNamespace) + .off('click' + elementEventNamespace) ; }, bodyStyle: function() { @@ -615,7 +615,7 @@ $.fn.modal = function(parameters) { }, clickaway: function() { $dimmer - .on('click' + elementNamespace, module.event.click) + .on('click' + elementEventNamespace, module.event.click) ; }, dimmerSettings: function() { @@ -627,10 +627,9 @@ $.fn.modal = function(parameters) { defaultSettings = { debug : settings.debug, dimmerName : 'modals', - variation : false, closable : 'auto', variation : settings.centered - ? '' + ? false : 'top aligned' , duration : {