Open Bug 1550635 Opened 6 years ago Updated 18 days ago

window.document.caretRangeFromPoint is not supported in Firefox

Categories

(Core :: DOM: Core & HTML, defect, P3)

66 Branch
Unspecified
Windows 10
defect

Tracking

()

ASSIGNED
Webcompat Priority P3
Tracking Status
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- wontfix

People

(Reporter: karlcow, Assigned: keithamus)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

(4 keywords, Whiteboard: 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

Flags: webcompat?
Webcompat Priority: --- → ?
Flags: webcompat?

We should file a bug in the compat standard for this, at least.

Flags: needinfo?(miket)
Webcompat Priority: ? → revisit
Flags: needinfo?(miket)

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.

Flags: needinfo?(karlt)

Guessing Hsin-Yi may have meant other Karl.

Flags: needinfo?(karlt) → needinfo?(kdubost)
Flags: needinfo?(htsai)

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?

Flags: needinfo?(kdubost)
Flags: needinfo?(htsai)
Flags: needinfo?(astevenson)
Webcompat Priority: revisit → P3

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.

Flags: needinfo?(a.stevenson82)
Severity: normal → S3

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.

Blocks: 1887054

Happened to notice this bug. Are you planning to ask review for the patch?

Flags: needinfo?(gregp)

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.

Flags: needinfo?(gregp)
Attachment #9397753 - Attachment is obsolete: true
Assignee: nobody → gregp
Status: NEW → ASSIGNED
Whiteboard: webcompat:risk-high

Link to jira https://mozilla-hub.atlassian.net/browse/FFXP-3167, also adding tentative scheduling info.

User Story: (updated)
User Story: (updated)
Attachment #9434118 - Attachment description: Bug 1550635 - Implement document.caretRangeFromPoint → Bug 1550635 - Implement document.caretRangeFromPoint r?#dom-core,smaug
No longer blocks: 1927838
Blocks: 1988830
Assignee: gregp → mozilla
No longer blocks: 1988830
Depends on: 1988830
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: