window.document.caretRangeFromPoint is not supported in Firefox
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: karlcow, Assigned: ltenenbaum)
References
(Depends on 1 open bug, Blocks 1 open bug, )
Details
(4 keywords, Whiteboard: [platform-feature], [wptsync upstream])
User Story
webcompat-risk:high
Attachments
(1 file, 1 obsolete file)
The lack of window.document.caretRangeFromPoint might get us blocked from using the site https://coda.io/
Reported initially on https://webcompat.com/issues/30408
Steps to reproduce:
On https://coda.io/signin
Firefox is redirected to https://coda.io/unsupported-browser?continueTo=%2Fsignin
On this page, they are pledging they are in the process of supporting other platforms.
Impersonating Chrome UA we can avoid the redirection, and access the application. After the sign up process, the application fails because of the lack of window.document.caretRangeFromPoint
That doesn't mean that if Firefox supported it, it would solve all issues for this case, but that's a starting point it seems.
This is currently supported by Blink, WebKit, EdgeHTML
not supported by Trident and Gecko.
https://developer.mozilla.org/en-US/docs/Web/API/Document/caretRangeFromPoint
Here an example of polyfill for it
https://github.com/Abel-Jr/OurSite/blob/55c221dd8abf474a1075c5d3a817eaae97b73fce/wp-includes/js/dist/dom.js#L614-L647
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•7 years ago
|
||
We should file a bug in the compat standard for this, at least.
Updated•7 years ago
|
Comment 2•6 years ago
|
||
Coda now is working on Firefox (even still without the caretRangeFromPoint support) , but not on Fenix.
Hi Karl, do you think you can help us do further investigation to understand the root cause of the issue on Android/Fenix? Thank you.
Comment 3•6 years ago
|
||
Guessing Hsin-Yi may have meant other Karl.
Updated•6 years ago
|
| Reporter | ||
Comment 4•6 years ago
|
||
Let's see if Adam has an opinion about Fenix and Coda.
Does the site work or is used on Google Chrome too?
Hsin-Yi, When you say this is not supported on Fenix? In which ways?
Updated•4 years ago
|
Comment 5•4 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit auto_nag documentation.
Updated•3 years ago
|
Comment 6•2 years ago
|
||
This would help us to pass the WPT https://wpt.fyi/results/css/css-contain/content-visibility/content-visibility-080.html, which Safari and Chrome both pass.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Comment 8•2 years ago
|
||
Happened to notice this bug. Are you planning to ask review for the patch?
Comment 9•2 years ago
|
||
Happened to notice this bug. Are you planning to ask review for the patch?
Yes.
This would help us to pass the WPT https://wpt.fyi/results/css/css-contain/content-visibility/content-visibility-080.html, which Safari and Chrome both pass.
I investigated this test a few months ago and it still fails even with the caretRangeFromPoint implementation. My memory is a bit fuzzy but I think the problem is content-visibility: hidden nodes get returned by nsLayoutUtils::GetFramesForArea, which is strange.
Probably, a new bug needs to be filed for this test.
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Link to jira https://mozilla-hub.atlassian.net/browse/FFXP-3167, also adding tentative scheduling info.
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•8 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Comment 12•7 months ago
|
||
Comment 14•7 months ago
|
||
Comment 15•7 months ago
|
||
Backed out for causing web failures at caretRangeFromPoint
Backout Link
Push with failures
Failure Log
Failure line TEST-UNEXPECTED-FAIL | /css/cssom/caretRangeFromPoint.tentative.html | document.caretRangeFromPoint() should return a client rect close to the given coords - assert_approx_equals: expected 21 +/- 1 but got 19
Comment 16•7 months ago
|
||
Comment 17•7 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 19•7 months ago
|
||
(Probably should not be marked as fixed given that it was backed out…)
Comment 20•7 months ago
|
||
Backout was merged in central: https://hg-edge.mozilla.org/mozilla-central/rev/004666b6406e1ae267db636c0ccb9cb1587c5df7
Comment 21•6 months ago
|
||
Comment 23•6 months ago
|
||
| bugherder | ||
Comment 25•6 months ago
|
||
:ltenenbaum did you want to include this in the Fx150 release notes? Feel free to nominate if so.
| Assignee | ||
Comment 26•6 months ago
|
||
No, I don't think it's relevant to many people since an API which basically does the same thing (caretPositionFromPoint) is already supported.
Updated•6 months ago
|
Comment 27•6 months ago
|
||
FF150 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/43550
Updated•6 months ago
|
Updated•12 days ago
|
Description
•