Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Tab select/deselect fire in 'wrong' order. #1557

Closed
jroxendal opened this issue Jan 10, 2014 · 1 comment
Closed

Tab select/deselect fire in 'wrong' order. #1557

jroxendal opened this issue Jan 10, 2014 · 1 comment
Milestone

Comments

@jroxendal
Copy link
Contributor

Currently, the select callback of a clicked tab fires before the deselect of the currently active tab. To me, the more natural order would be the reverse. That way it would be easier to figure out where to put code that should run some cleanup in the tab that being deselected (which, if deselect and select callbacks modify the same global variable, it kindof a big deal).

In my use case, selecting one tab causes a sidebar to be shown, deselecting it causes it to hide. If I have two tabs with that behavior, the select event of the clicked tab will fire, causing the already open sidebar to open, then the deselect event fires, causing it to close.

I wouldn't be opposed to writing up a patch if you agree with my take on things.

@bekos
Copy link
Contributor

bekos commented Jan 10, 2014

@jroxendal What you are saying seems reasonable. If you are going for a PR, please also provide an accompanying test for your change.

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

No branches or pull requests

2 participants