-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
browser(firefox): Page.setComposition #9921
Conversation
8d56791
to
b2da497
Compare
43ecf6c
to
3b60ad1
Compare
efa1aa1
to
6a3d326
Compare
bc0d444
to
f5afd61
Compare
f5afd61
to
3a33877
Compare
} else { | ||
const selection = window.getSelection(); | ||
const anchorNode = selection.anchorNode; | ||
selection.setBaseAndExtent(anchorNode, replacementStart, anchorNode, replacementEnd); |
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.
This doesn't look quite right. Aside from the shadow dom issues, the macOS api this is modeled after expects this range to be in terms of the current root editable node. However your code is in terms of the leaf editable node.
You can see this code in TextInputHandler.mm : IMEInputHandler::SetMarkedText, which ends up in the web process as ContentEventHandler::OnSelectionEvent. I am working on a patch to fix this but I'm not sure if I should duplicate the logic in JavaScript or add a hack for us to call the c++ code directly.
Closing due to no progress (on our side). I'm not sure what the action for this should be, but we aren't considering adding composition API at this point. |
Extracted the Firefox browser patches changes from #9535.