-
-
Notifications
You must be signed in to change notification settings - Fork 79k
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.js: Fixes on click handling #33586
Tab.js: Fixes on click handling #33586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it realistic that someone would initialize tabs by themself and call show()
but expecting that nothing happens when the element is disabled? If not then isDisabled
on L70 is redundant I'd say because ignoring disabled elements is handled by the click handler now.
Edit: Hm maybe it's not redundant. There would be a way with jQuery to ignore the isDisabled 🤔
Another Edit: Looks like our spec does exactly what I mentioned. Sorry @GeoSot 😅
ff7f3ef
to
3a12793
Compare
* use prevent default only if triggered by anchor * disable auto-initialization if trigger is disabled * Remove `isDisabled` check on `show` mehtod, as it is being handled by the click handler
Sorry @GeoSot.. Figured my proposal is breaking our spec and it would be still possible to trigger show via jQuery. Maybe it's better to leave it there even if it's somewhat redundant..
dc97f15
to
9bd99d6
Compare
Things did:
isDisabled
check during click handlingisDisabled
check on methodshow