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

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

Comments

Projects
None yet
1 participant
@gabrielschulhof
Contributor

gabrielschulhof commented Nov 27, 2013

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

This comment has been minimized.

Show comment Hide comment
@gabrielschulhof

gabrielschulhof Nov 27, 2013

Contributor

The ugly workaround:

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

gabrielschulhof commented Nov 27, 2013

The ugly workaround:

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

This comment has been minimized.

Show comment Hide comment
@gabrielschulhof

gabrielschulhof Feb 12, 2014

Contributor

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.

Contributor

gabrielschulhof commented Feb 12, 2014

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

This comment has been minimized.

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