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

suggest not working on android (keydown keycode is always 229) #10

Closed
mzechmeister opened this issue Oct 15, 2021 · 1 comment
Closed

Comments

@mzechmeister
Copy link
Owner

mzechmeister commented Oct 15, 2021

The "$" cannot be captured with keydown or keyup.
See https://stackoverflow.com/questions/36753548/keycode-on-android-is-always-229.
The different behaviour between desktop and mobile browers is annoying.
Thus the suggestion list does not popup.

Alternatives could be oninput or onbeforeinput.
The behaviour can be tested here:
https://codepen.io/impressivewebs/pen/wvzKbVx?editors=0010
http://jsfiddle.net/vLga0fb9

onbeforeinput is triggered in android chrome, but .data seems to work only in latest version.
Some more experiences here: ckeditor/ckeditor5#3131.

@mzechmeister
Copy link
Owner Author

mzechmeister commented Oct 18, 2021

Finally solved by using oninput and deleting the $ with selection+range.

Note that onkeyup and onselectionchange are fired in different order on mobiles and desktop:
https://www.w3schools.com/code/tryit.asp?filename=GVJJ5PNFT6GA
See also
https://stackoverflow.com/a/69429589/11769765

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

No branches or pull requests

1 participant