Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Panel: Can't set the ID later on #6769

Closed
gabrielschulhof opened this issue Nov 27, 2013 · 3 comments
Closed

Panel: Can't set the ID later on #6769

gabrielschulhof opened this issue Nov 27, 2013 · 3 comments
Assignees
Milestone

Comments

@gabrielschulhof
Copy link

If you want to assign an ID to the panel after it has been created, it will no longer open upon clicks on links with the new ID in their href, because the panel stores its ID upon _create() in this._panelID and only consults that when deciding whether to open.

It should consult this.element.attr( "id" ) instead, but we should check in the git history why this additional indirection has been introduced.

@gabrielschulhof
Copy link
Author

The ugly workaround:

panel.data( "mobile-panel" )._panelID = panelId;

@gabrielschulhof
Copy link
Author

Actually, this indirection has always been there, because it was never expected that a panel will change its ID at runtime. It was introduced here so that a single page may be able to accommodate multiple panels.

@gabrielschulhof
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant