Closed Bug 2055955 Opened 1 month ago Closed 24 days ago

Text input should still be possible through EditContext when another element is selected but not focused

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox155 --- fixed

People

(Reporter: ltenenbaum, Assigned: ltenenbaum)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file canvas.html

I am thinking that for canvas-based EditContext to be accessible, it will be necessary to keep the selection in the EditContext in sync with the selection in the DOM fallback content, as demonstrated in the attached file. However, we don't allow text input if the selection is outside of the EditContext associated element.

(It's possible that this causes issues even with DOM-based EditContext, so I'll mark this as blocking bug 2046107.)

Although, perhaps we shouldn't accept text input for DOM-based EditContext when the selection is somewhere else, since the DOM selection is supposed to correspond to the selection in the EditContext.
Edit: Chrome does accept input for DOM-based EditContext even if the selection is somewhere else, so let's follow that.

Blocks: editcontext
No longer blocks: 2046107

Oh hmm no, Chrome actually just forces the selection to stay in the DOM EditContext, even if it's changed by the Selection API. So it's fine to handle this for canvas only.

No, that's wrong, Chrome does allow the selection to go outside, but it doesn't render the caret, even if caret browsing is enabled.

https://ltenmoz.github.io/editcontext-canvas/index.html is a more fleshed-out editor than the one attached here.

Pushed by ltenenbaum@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/ca1b52a68258 https://hg.mozilla.org/integration/autoland/rev/051c443862b3 Allow text input into focused EditContext even if selection is elsewhere. r=masayuki

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/61576 for changes under testing/web-platform/tests

Status: ASSIGNED → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch

Upstream PR merged by moz-wptsync-bot

QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: