New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panel: Link listener fires on removed panel #6309

Closed
tschettler opened this Issue Aug 7, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@tschettler

tschettler commented Aug 7, 2013

After a panel is removed, its link listener will still fire. If a new
panel with the same id is added, the previously removed panel will be
chosen for any panel link click events.

Test Page: http://jsbin.com/ayomes/1

Steps to reproduce:

  1. Click "Open Panel"
  2. Click "Close"
  3. Click "Recreate Panel"
  4. Click "Open Panel"

Expected outcome: The newly created panel should open
Actual outcome: No panel is opened

Platforms/browsers tested:
Windows 7 (64-bit)
Chrome 26.0.1450.0
Firefox 20.0.1
Opera 12.15
Safari 5.1.7
IE10

jQuery Mobile (latest)
jQuery 1.9.1

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Aug 7, 2013

Member

@tschettler

You can use the destroy method to remove the panel and all bindings: http://jsbin.com/ayomes/2/edit
At the moment the new panel will still not open, but that's a known bug we are currently working on. Because there is already a ticket for that (#6254) I am closing this one.

Member

jaspermdegroot commented Aug 7, 2013

@tschettler

You can use the destroy method to remove the panel and all bindings: http://jsbin.com/ayomes/2/edit
At the moment the new panel will still not open, but that's a known bug we are currently working on. Because there is already a ticket for that (#6254) I am closing this one.

@tschettler

This comment has been minimized.

Show comment
Hide comment
@tschettler

tschettler Aug 7, 2013

I don't think that captures the entirety of the issue. From the example you just listed, when I click "Recreate Panel", the old panel is shown at the bottom of the page. That's where the call to ".remove()" comes in, since it will actually remove the markup for the panel. After the panel is removed from the page, any new panel with the same id will never get opened.

This is an issue that I am currently facing and the pull request I submitted fixed the issue.

tschettler commented Aug 7, 2013

I don't think that captures the entirety of the issue. From the example you just listed, when I click "Recreate Panel", the old panel is shown at the bottom of the page. That's where the call to ".remove()" comes in, since it will actually remove the markup for the panel. After the panel is removed from the page, any new panel with the same id will never get opened.

This is an issue that I am currently facing and the pull request I submitted fixed the issue.

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Aug 7, 2013

Member

@tschettler

You are right. I should have kept the remove() in there: http://jsbin.com/ayomes/8/edit
I still think that the destroy method should make this work, but will re-open this ticket and test again when the other panel issue is fixed.

Member

jaspermdegroot commented Aug 7, 2013

@tschettler

You are right. I should have kept the remove() in there: http://jsbin.com/ayomes/8/edit
I still think that the destroy method should make this work, but will re-open this ticket and test again when the other panel issue is fixed.

@arschmitz

This comment has been minimized.

Show comment
Hide comment
@arschmitz

arschmitz Aug 12, 2013

Member

closing this should have closed with commit by @uGoMobi

Member

arschmitz commented Aug 12, 2013

closing this should have closed with commit by @uGoMobi

@arschmitz arschmitz closed this Aug 12, 2013

@jaspermdegroot

This comment has been minimized.

Show comment
Hide comment
@jaspermdegroot

jaspermdegroot Aug 12, 2013

Member

The commit is still in a branch, not on master but we will merge this soon.

Member

jaspermdegroot commented Aug 12, 2013

The commit is still in a branch, not on master but we will merge this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment