From a79117742426c4204d8fb0a155470626fc1b01d1 Mon Sep 17 00:00:00 2001 From: jlukic Date: Fri, 5 Dec 2014 17:21:03 -0500 Subject: [PATCH] Fix for clickaway unbinding if clicked during animation --- src/definitions/modules/modal.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 7a446a843..09acec79f 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -53,9 +53,9 @@ $.fn.modal = function(parameters) { eventNamespace = '.' + namespace, moduleNamespace = 'module-' + namespace, - $module = $(this), - $context = $(settings.context), - $close = $module.find(selector.close), + $module = $(this), + $context = $(settings.context), + $close = $module.find(selector.close), $allModals, $otherModals, @@ -63,8 +63,8 @@ $.fn.modal = function(parameters) { $dimmable, $dimmer, - element = this, - instance = $module.data(moduleNamespace), + element = this, + instance = $module.data(moduleNamespace), elementNamespace, id, @@ -219,8 +219,8 @@ $.fn.modal = function(parameters) { click: function(event) { if( $(event.target).closest($module).size() === 0 ) { module.debug('Dimmer clicked, hiding all modals'); - module.remove.clickaway(); if( module.is.active() ) { + module.remove.clickaway(); if(settings.allowMultiple) { module.hide(); }