Skip to content
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

Fix caret position updating with touch events in chrome #6193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ge-lx
Copy link

@Ge-lx Ge-lx commented Mar 27, 2020

There has been an issue in Chromium for quite a while (> 5 years) now, which breaks changing the caret position via touch events.

I have provided more details about the bug in #5844.

While the fix is not the most elegant - I have to admit - it should not break anything else since it only interferes with Chrome environments where there is an .activeTouch. It did not break any tests for me.

@marijnh
Copy link
Member

marijnh commented Mar 29, 2020

I'm a bit skeptical about this not breaking anything—it looks like it will freeze the display as long as a touch event is active, which could, if you make, for example, a programmatic change while a touch is active, leave the editor displaying the wrong state.

Have you looked into kludges that focus on clearing activeTouch more proactively? For example, store the touch target in that object, and when it isn't part of the editor anymore after a display update, clear activeTouch?

@Ge-lx
Copy link
Author

Ge-lx commented Apr 1, 2020

How would that fix the issue of the missing caret position update?

I also just noticed that I referenced the wrong chromium bug. I think this one is more appropriate and explains the underlying issue a bit better.

Sorry, I don't have the resources to dig into the code that much, so I cannot offer any help on more sophisticated mitigation methods. My hope is that the browser bug gets addressed and we receive at least a touchcancel event to which we can react.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants