Panel panelclose event does not work (jquery mobile 1.4) #7058

Closed
dgruzda opened this Issue Feb 3, 2014 · 1 comment

Projects

None yet

3 participants

@dgruzda
dgruzda commented Feb 3, 2014

If I attach multiple event handlers simultaneously using a plain object, panelclose event does not work:
$(document).off("panelopen panelclose", '[name="panel_2"]').on({
panelopen: function() {
alert('Panel open');
},
panelclose: function() {
alert('Panel close');
}
}, '[name="panel_2"]');

@jaspermdegroot
Member

@dgruzda

Thanks for reporting the issue.
The problem seems to be this line: https://github.com/jquery/jquery-mobile/blob/master/js/widgets/panel.js#L291
Test page: http://jsbin.com/AKOmUxa/107/edit
Using a plain object is not relevant so I am going to remove that from the title.

Ps. Please, always include a test page when reporting issues. See our contributing guidelines. Thanks!

@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Mar 19, 2014
@cgack cgack Panel: panelclose event does not work
panelclose is not bound to document after _openPanel

Fixes gh-7058
7ef92de
@gabrielschulhof gabrielschulhof added this to the 1.4.3 milestone Mar 19, 2014
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Apr 24, 2014
@cgack cgack Panel: panelclose event does not work
altered to use _on and _off

Fixes gh-7058
c0fbaaf
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Apr 24, 2014
@cgack cgack Panel: panelclose event does not work
altered _on and added another test

Fixes gh-7058
973cc54
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue May 29, 2014
@cgack cgack Panel: panelclose event does not work
fix use of _on

Fixes gh-7058
d836518
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Jun 13, 2014
@cgack cgack Panel: panelclose event does not work
Fixes gh-7058
f93385d
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Jun 13, 2014
@cgack cgack Panel: panelclose event does not work
panelclose is not bound to document after _openPanel

Fixes gh-7058

Panel: panelclose event does not work

altered to use _on and _off

Fixes gh-7058

Panel: panelclose event does not work

altered _on and added another test

Fixes gh-7058

Panel: panelclose event does not work

fix use of _on

Fixes gh-7058

Panel: panelclose event does not work

Fixes gh-7058
4c2ed33
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Jun 14, 2014
@cgack cgack Panel: panelclose event does not work
Fixes gh-7058
Closes gh-7260
3728bc8
@cgack cgack added a commit to cgack/jquery-mobile that referenced this issue Jun 14, 2014
@cgack cgack Panel: use self._off for panelclose instead of document.off
Fixes gh-7058
Closes gh-7260
1f763bc
@arschmitz arschmitz closed this in 3df9b3b Jun 14, 2014
@arschmitz arschmitz added a commit that referenced this issue Jun 16, 2014
@cgack @arschmitz cgack + arschmitz Panel: use self._off for panelclose instead of document.off
Fixes gh-7058
Closes gh-7260

(cherry picked from commit 3df9b3b)
c8ca19d
@agcolom agcolom added a commit to agcolom/jquery-mobile that referenced this issue Nov 26, 2014
@cgack @agcolom cgack + agcolom Panel: use self._off for panelclose instead of document.off
Fixes gh-7058
Closes gh-7260
f0f181d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment