-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(overlay): safari :focus-visible inconsistency when using overlay type modal #4912
Conversation
Branch previewReview the following VRT differencesWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
If the changes are expected, update the |
Pull Request Test Coverage Report for Build 12986995120Details
💛 - Coveralls |
Lighthouse scores
What is this?Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on Transfer Size
Request Count
|
Tachometer resultsCurrently, no packages are changed by this PR... |
|
||
// This fails but when manually tested it works in the browser | ||
// in the test it shows that the tooltip is open (overlayTrigger.open === 'hover') | ||
// expect(overlayTrigger.open).to.be.undefined; |
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.
Would appreciate any feedback/ideas on why would this be flaky, couldn't yet figure out why this would fail if manually tested it works.
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.
iinnnteresting
await closed; | ||
|
||
// Manually testing this in the browser doesn't fail without the handleKeyup method but it should | ||
// expect(overlayTrigger.open).to.equal('hover'); |
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.
Same thing here as in the previous test.
@mizgaionutalexandru Thanks for doing this! Shaping up well! By any chance were you able to test this in a touch interface? |
Yes, I have tested this on mobile and tablet simulators as well as a real iPad device. It seems to work just fine. I don't know why the written tests fail though. |
d33732c
to
9c7e5eb
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.
This needs to be updated so as to make sure the hover
tooltip opens in the following case on other browsers too.
- Click on the trigger open the popover
- press escape
(expect the hover to be opened again)
19f8cee
to
6f4fca8
Compare
|
If we can just remove that forgotten |
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.
Thank you for this! 😃
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.
Tests are still failing when run parallel to other ones. They're only passing if we only run those tests separately. We'll have to take another look :(
Description
This PR makes so that the tooltip isn't shown after a click overlay (e.g. popover) is opened in Safari in a
type="modal"
overlay, to have the same behaviour as in Chrome/Firefox. The inconsistency comes from the different heuristics Webkit uses to apply thefocus-visible
pseudo-class on elements.Related issue(s)
Motivation and context
The main motivation is consistency across browsers/engines.
How has this been tested?
These test cases have been tested in Safari as well as other supported browsers (e.g. Chrome).
Test case 1
type="modal"
and a click and hover effectTest case 2
type="modal"
and a click and hover effectDid it pass in Desktop?
Did it pass in Mobile?
Did it pass in iPad?
Screenshots (if appropriate)
Before the fix:
before.mov
After the fix:
after.mov
Types of changes
Checklist
Best practices
This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against
main
.