From 59e2f986ce4dc646856404589d275b6969ae8b1c Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 2 Mar 2015 12:16:45 -0500 Subject: [PATCH] #1896 Add elementNamespace to other document/context events --- src/definitions/modules/popup.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 00cee59ce..aa5194672 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -813,18 +813,18 @@ $.fn.popup = function(parameters) { close:function() { if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') { $document - .one('touchmove' + eventNamespace, module.hideGracefully) - .one('scroll' + eventNamespace, module.hideGracefully) + .one('touchmove' + elementNamespace, module.hideGracefully) + .one('scroll' + elementNamespace, module.hideGracefully) ; $context - .one('touchmove' + eventNamespace, module.hideGracefully) - .one('scroll' + eventNamespace, module.hideGracefully) + .one('touchmove' + elementNamespace, module.hideGracefully) + .one('scroll' + elementNamespace, module.hideGracefully) ; } if(settings.on == 'click' && settings.closable) { module.verbose('Binding popup close event to document'); $document - .on('click' + eventNamespace, function(event) { + .on('click' + elementNamespace, function(event) { module.verbose('Pop-up clickaway intent detected'); module.hideGracefully.call(element, event); }) @@ -837,16 +837,16 @@ $.fn.popup = function(parameters) { close: function() { if(settings.hideOnScroll === true || settings.hideOnScroll == 'auto' && settings.on != 'click') { $document - .off('scroll' + eventNamespace, module.hide) + .off('scroll' + elementNamespace, module.hide) ; $context - .off('scroll' + eventNamespace, module.hide) + .off('scroll' + elementNamespace, module.hide) ; } if(settings.on == 'click' && settings.closable) { module.verbose('Removing close event from document'); $document - .off('click' + eventNamespace) + .off('click' + elementNamespace) ; } }