diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index de713f488d..03573c8ade 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -3,6 +3,7 @@ ### Version 2.2.0 - XX XX, 2016 **Major Enhancements** +- **Popup** - Added new `tooltip` popup type that works **without javascript**. Tooltips can specify positioning and some variations using `data` attributes, and will handle positioning automatically with CSS only. - **Webpack** - Modified all relative paths in project to prefix with `./` to make them webpack friendly (wont be misinterpreted as module) - **Popup** - Added new setting `boundary` and `scrollContext. `boundary` lets you specify an element that the popup will try to position itself to be contained inside of. `scrollContext` lets you specify the element which when scrolled should hide the popup - **Popup** - Added new settings `autoRemove`, which is enabled by default. This will add special event listeners to auto hide a popup if the triggering element is removed from the DOM. This is useful in controlled DOM environments like Meteor/Ember/React to ensure a popup auto-hides itself when a page navigation or other DOM change occurs that may not trigger `mouseout`. @@ -62,6 +63,7 @@ - **Menu** - `stackable` menu with `left/right` `menu` or `item` would incorrectly be floated when stacked. #3604 - **Menu** - `@dividerSize` was not being used in `vertical menu` #3781 - **Modal** - RGB values set for dimmer `background-color` were not being correctly interpreted #3665 **Thanks @larsbo** +- **Modal/Dimmer** - Fixed issue with `destroy` not properly removing events from dimmer #3200 - **Popup** - checking `instanceof SVGGraphicsElement` caused error in IE11 #3043 - **Progress** - Progress `onSuccess`, `onError`, and `onWarning` callbacks now occur **after** the animation completes for the state change. - **Rating** - rating does not fire `onRate` when rating is initialized #3712 diff --git a/src/definitions/modules/dimmer.js b/src/definitions/modules/dimmer.js index 62cbed175c..55f4581073 100644 --- a/src/definitions/modules/dimmer.js +++ b/src/definitions/modules/dimmer.js @@ -144,6 +144,9 @@ $.fn.dimmer = function(parameters) { $module .removeData(moduleNamespace) ; + $dimmable + .off(eventNamespace) + ; } }, @@ -206,6 +209,7 @@ $.fn.dimmer = function(parameters) { ? callback : function(){} ; + debugger; if( module.is.dimmed() || module.is.animating() ) { module.debug('Hiding dimmer', $dimmer); module.animate.hide(callback); diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 2b8fc83deb..4f8c30fc02 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -73,7 +73,7 @@ $.fn.modal = function(parameters) { element = this, instance = $module.data(moduleNamespace), - elementNamespace, + elementEventNamespace, id, observer, module @@ -141,7 +141,7 @@ $.fn.modal = function(parameters) { }, id: function() { id = (Math.random().toString(16) + '000000000').substr(2,8); - elementNamespace = '.' + id; + elementEventNamespace = '.' + id; module.verbose('Creating unique id for element', id); } }, @@ -152,7 +152,8 @@ $.fn.modal = function(parameters) { .removeData(moduleNamespace) .off(eventNamespace) ; - $window.off(elementNamespace); + $window.off(elementEventNamespace); + $dimmer.off(elementEventNamespace); $close.off(eventNamespace); $context.dimmer('destroy'); }, @@ -213,7 +214,7 @@ $.fn.modal = function(parameters) { .on('click' + eventNamespace, selector.deny, module.event.deny) ; $window - .on('resize' + elementNamespace, module.event.resize) + .on('resize' + elementEventNamespace, module.event.resize) ; } }, @@ -503,7 +504,7 @@ $.fn.modal = function(parameters) { clickaway: function() { if(settings.closable) { $dimmer - .off('click' + elementNamespace) + .off('click' + elementEventNamespace) ; } }, @@ -588,7 +589,7 @@ $.fn.modal = function(parameters) { clickaway: function() { if(settings.closable) { $dimmer - .on('click' + elementNamespace, module.event.click) + .on('click' + elementEventNamespace, module.event.click) ; } },