-
Notifications
You must be signed in to change notification settings - Fork 4.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
Remove previous safari-specific fix for selection styles #57298
Conversation
- Testing shows this is no longer needed in Safari - It causes issues in newer chrome versions
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.
I recall the conversation from a separate issue and thread, where I tested myself and numerous others tested. The conclusion from that was that this is safe. Thank you.
Size Change: -6 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Is it possible to keep the Safari specific CSS using UA sniffing or so? |
I was a bit quick in approving this, because I assumed it was the same fix. Apologies, I've since refilled my coffee. The "after" state was in fact the state we meant to fix. So I would echo Pascal: are there other ways we can keep the fix just for Safari? |
Flaky tests detected in 50edbba. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7285385787
|
Not sure. I don't really have any time to do code contributions right now, but noticed there was no fix, so hurried something together. If anyone has ideas feel free to push them to the PR! |
This may be risky territory, but since we're already discussing a hack, another hack may be worth it. Let me try a PR. Essentially this may be still working as a Safari only CSS hack:
|
It seems to work: #57300 Let me know what you think, it seems like keeping it Safari only, and with the same result as this PR if Safari in the future fixes the hack that enables it to work, makes it pretty safe, IMO. |
Tested Chrome Canary Version 122.0.6215.0 (Official Build) canary (64-bit) and I don't see the same issue. Everything seems to be working fine. 🤔 Can anybody else test it? Happy I can edit my posts without going crazy again now. |
There was a fix for this in #57300, so I'll close this PR. @TheSimArchitect It might be that you now have the fix from #57300, but also the chrome team indicated they'd delay the feature that resulted in the issue with the gutenberg selection styles - #56408 (comment) - it may no longer be on by default. |
What?
Fixes #56408
A past fix for selection styles in Safari is causing an issue in newer versions of Chrome—it results in any text selection being invisible.
How?
I've removed the fix for Safari, but unfortunately it reintroduces an issue there. Unless someone else can fix this in a better way, then I think this is the best trade-off.
Testing Instructions
Expected: Nothing weird should happen visually, text should be selected
But In Safari: Some of the selection styles do look a bit clunky
Screenshots or screencast
Before, in Chrome Canary:
Kapture.2023-12-21.at.15.45.25.mp4
Before, in Safari
After, in Chrome Canary:
After, in Safari: