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
Adding a blur() method to selection-contenteditable-011.html #25642
Conversation
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 suspect your alternative .focus()-on-the-reference method would be better, but I will approve this for now.
With this change, I will see how selection-contenteditable-011.html test is rendered in Chrome 87+ and Safari Preview 113+: in the reference file instead or, like you said, add .focus()-on-the-reference.
|
Blurrying the |
Chrome 88 has this user agent stylesheet rule:
An unexpected problem with focusing is that focus()-ing after select()-ing actually deselects the contenteditable element in Chrome 88. So now, this is an additional constraint and an unexpected one... and I have not even looked at Safari 114 right now |
In a few min., I will create another PR which will use document.getElementById("test").focus(); document.getElementById("test").style.caretColor = "yellow"; only in the reference file "selection-contenteditable-011-ref.html" and only on the contenteditable element. The blur() method will be removed from the "selection-contenteditable-011.html" test. |
/css/css-pseudo/selection-contenteditable-011.html
Right now, both Chrome 87 and Safari Preview 113 appear to be styling the border of focused
<div contenteditable="true">
in the selection-contenteditable-011.html . This focusing creates an additional (and unwanted) cause of failure in both browsers. The addition of the blur() in the code of this selection-contenteditable-011.html test is trying to neutralize such focusing style. [If this works for selection-contenteditable-011.html , then I will be able to add the same blur() code into selection-textarea-011.html later.]On my website,
http://www.gtalbot.org/BrowserBugsSection/CSS4Pseudo/selection-contenteditable-011-new.html
[Addendum: now that I am thinking more about it, maybe it was better to add focus() to the
<div contenteditable="true">
in the reference file instead of adding blur() to the<div contenteditable="true">
of the test.]