-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(tabs): disabled tab link not preventing router navigation #10358
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
Conversation
002e0c5
to
06f7e28
Compare
06f7e28
to
7834261
Compare
7834261
to
f1dc190
Compare
@andrewseguin can you take a look at this one? |
@josephperrott can you take a look at this one? |
// preventing the default action through JS, because we can't prevent the action reliably | ||
// due to other directives potentially registering their events earlier. This shouldn't cause | ||
// the user to click through, because we always have a `.mat-tab-links` behind the link. | ||
pointer-events: none; |
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.
Will this prevent tabbing to the element and hitting enter
to navigate?
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.
We add tabindex="-1"
when the link becomes disabled so you can't tab to it.
Fixes users being able to navigate to a new route by clicking on a disabled `mat-tab-link`. Fixes angular#10354.
f1dc190
to
3762d26
Compare
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.
LGTM
…r#10358) Fixes users being able to navigate to a new route by clicking on a disabled `mat-tab-link`. Fixes angular#10354.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes users being able to navigate to a new route by clicking on a disabled
mat-tab-link
.Fixes #10354.