fix(ui-buttons): make Button have a focus ring in Safari#2012
Merged
ToMESSKa merged 1 commit intoJun 6, 2025
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the focus ring issue for BaseButton in Safari by adding a condition for Safari detection and updating the tabindex logic.
- Adds a Safari-specific condition using utils.isSafari()
- Updates tabindex assignment to ensure focusability in Safari
Comments suppressed due to low confidence (1)
packages/ui-buttons/src/BaseButton/index.tsx:283
- [nitpick] The condition for applying a default tabindex in Safari may override an explicitly provided tabindex. Consider checking if tabindex is undefined before defaulting to 0 to ensure custom tabindex values are respected.
if ((onClick && as && needsZeroTabIndex) || (utils.isSafari() && as)) {
|
matyasf
reviewed
Jun 5, 2025
Collaborator
There was a problem hiding this comment.
please dont use * imports, they might break in Vite and also increase bundle size (because it always imports everything)
Contributor
Author
There was a problem hiding this comment.
Thanks, i fixed this
68c5358 to
3452796
Compare
joyenjoyer
approved these changes
Jun 5, 2025
matyasf
approved these changes
Jun 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
INSTUI-4527
ISSUE:
TEST PLAN: