-
Notifications
You must be signed in to change notification settings - Fork 78
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
Tab activated events are fired on closing a tab with X button #1452
Comments
If closing a tab - activate should not fire for that tab. |
Descoping this issue for now. Its not totally incorrect since when you click the tab it activates first as your clicking it as well as the close button |
Hi @tmcconechy, can we reopen this issue? It is causing problems for my team (with regard to logic that runs when activating a tab). I was about to open a new issue for this exact problem today, but then I found this closed issue. If a user clicks the X icon, their intention is to close the tab (not activate it). It's strange that the tab becomes active for a split second right before getting closed. Note: the problem does not occur when closing a tab that is in the overflow menu. Thanks! |
yeah i suppose i agree - i was looking at the functionality of it not the events. we can add it back to the backlog |
Suggested Fix: tabs.js - lines 798-802
Note: I have not fully tested this fix, but it seems good based on my limited testing. |
QA Passed .v4.63.0-dev |
Describe the bug
It appears that any time a tab is closed via clicking the X, the activated events (before and after included) fire before the delete, and the event target is the tab set container, so I don't really have anyway of knowing that this activation event came from a deletion.
To Reproduce
Expected behavior
A. The first set of activated events don't fire at all.
B. If not that, then I'd like some reliable way to know to selectively ignore it in my activated handlers.
Version
Appears to be happening in 4.11 and the latest 4.15 dev (likely everything in between)
Platform
The text was updated successfully, but these errors were encountered: