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

Repl misbehaving in chrome for android version 78.0.3904.108 #230

Open
ilovecat opened this issue Nov 25, 2019 · 2 comments
Open

Repl misbehaving in chrome for android version 78.0.3904.108 #230

ilovecat opened this issue Nov 25, 2019 · 2 comments

Comments

@ilovecat
Copy link

When typing in repl the text cursor is not moving,and text is not visible.but the text can be selected.

android version:6.0
chrome 78.0.3904.108

@sevillaarvin
Copy link

sevillaarvin commented Nov 25, 2019

Sample screenshot:

Context: typed "asdf", then press return key

image

@sevillaarvin
Copy link

sevillaarvin commented Nov 25, 2019

I suspect this issue is related: substance/substance#982, i.e., the keyup / keydown event is emitting a different value in Desktop Chrome vs Android Chrome.

I noted that repl.js uses the "keydown" event in https://github.com/evancz/guide.elm-lang.org/blob/master/repl/src/Repl.elm

onKeyDown : Attribute Msg
onKeyDown =
  preventDefaultOn "keydown" <|
    D.map4 (\key alt ctrl meta -> ( Press key alt ctrl meta, not (alt || ctrl || meta) ))
      (D.field "key" D.string)
      (D.field "altKey" D.bool)
      (D.field "ctrlKey" D.bool)
      (D.field "metaKey" D.bool)

These are just my observations, I'm still an Elm beginner. What's curious is that the return key works, but the rest of the characters do not.

Also see https://bugs.chromium.org/p/chromium/issues/detail?id=118639. It seems the keydown / keyup events are broken in Android Chrome, and the bug is labeled WontFix. From the tracker:

The bottom line is that if you want your keyboard-knowledgeable web page to work with Chrome, you're going to have to be tolerant of IME's idiosyncrasies with regard to key-codes.

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

2 participants