forked from platypush/platypush
Panel and modal close bindings should refer the target element in the event, not $(this)
This commit is contained in:
parent
749436c452
commit
73383ab80f
1 changed files with 2 additions and 2 deletions
|
@ -173,7 +173,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
$('body').on('mouseup touchend', function(event) {
|
$('body').on('mouseup touchend', function(event) {
|
||||||
var $source = $(this);
|
var $source = $(event.target);
|
||||||
if (!$source.parents('.modal').length
|
if (!$source.parents('.modal').length
|
||||||
&& !$source.data('modal')
|
&& !$source.data('modal')
|
||||||
&& !$source.data('dismiss-modal')) {
|
&& !$source.data('dismiss-modal')) {
|
||||||
|
@ -196,7 +196,7 @@ $(document).ready(function() {
|
||||||
|
|
||||||
var initPanelCloseBindings = function() {
|
var initPanelCloseBindings = function() {
|
||||||
$('body').on('mouseup touchend', function(event) {
|
$('body').on('mouseup touchend', function(event) {
|
||||||
var $source = $(this);
|
var $source = $(event.target);
|
||||||
if ($source.data('panel') || $source.parents('[data-panel]').length) {
|
if ($source.data('panel') || $source.parents('[data-panel]').length) {
|
||||||
var $panel = $source.data('panel') ? $($source.data('panel')) :
|
var $panel = $source.data('panel') ? $($source.data('panel')) :
|
||||||
$($source.parents('[data-panel]').data('panel'));
|
$($source.parents('[data-panel]').data('panel'));
|
||||||
|
|
Loading…
Reference in a new issue