-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
FocusTrap: Fix outline focus #7835
Conversation
Hi. Thanks for PR. |
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.
Tested it out and is a nice improvement
I wonder if the focus trap is part of the cause of #4283 |
it seems to be the solution to this problem |
@henon I'm not sure, but I'm testing this case |
Would be so great if it worked because it's been causing issues for years. Another example in #8451 |
I found the cause of this problem; it's not in the FocusTrap but in the style applied to the MudButton. I will try to solve this problem in the best way possible and push a new update. |
@LiZzeira that would be kind of you. Just open another PR please, I am merging this one. |
@henon @danielchalmers |
New PR open |
Description
Locate the problem within the MudFocusTrap component. You can typically find the relevant code in the Razor component file.
In the Razor component file, navigate to the specific line (e.g., line 22) where the MudFocusTrap component is defined using the
Within this
Before:
https://github.com/MudBlazor/MudBlazor/assets/79289665/e197d41d-5847-4943-8e09-7d5f7a2f2f93
After:
https://github.com/MudBlazor/MudBlazor/assets/79289665/fa4ab9b6-325b-477a-b8c1-e8b385fce841
How Has This Been Tested?
To test the problem:
Open a web browser that uses the Chromium engine, such as Google Chrome or Microsoft Edge.
Load the web page or web application that contains the MudFocusTrap component you want to test.
Open the dialog or window that contains the MudFocusTrap component. Ensure that the dialog is visible on the screen.
Within the content of the dialog, click on an area where there are no other interactive components, such as buttons or text input fields.
Press any key on the keyboard. Notice that an unwanted focus or outline may become visible around the MudFocusTrap component.
Dialog - MudBlazor - Google Chrome 2023-11-30 10-10-48.zip
Types of changes
Checklist:
dev
).