Probably a known issue I don't know about yet, but the example page https://reagent-project.github.io/ shows a text input with shared input on the form
The value is now: foo
Change it here: [foo]
... however, the atom-input defined there has a really wonky behaviour in Chrome on Android (might be other mobile browsers with the same issue), where the text duplicates when the on-screen keyboard is used.
Changing the code from
(defn atom-input [value]
[:input {:type "text"
:value @value
:on-change #(reset! value (-> % .-target .-value))}])
to
(defn atom-input [value]
[:input {:type "text"
:value @value
:on-change #(do (reset! value (-> % .-target .-value))
(r/flush))}])
works... but clearly this isn't the preferred solution to get this to work in Chrome on Android, right?
There's lots of weirdness by the way. It works fine with digits, but letters make the input go bonkers.
If it's a new issue I can post a video, but I have to assume I'm not the only one experiencing this. I got notified of the issue after reports from customers of an app I'm working on (I'm using FF on Android, and it works there 🤷 ).Cannot reproduce in Chrome 131.0.6778.200. Not related to your question directly, but I once had to chase a bug that ended up being due to a very slightly outdated version of Safari.
My setup is Chrome 134.0.6998.135 on Android 14, Galaxy S24.
Ah, I just got a system update, so the only difference in our setups is that I have S23. Still can't reproduce the behavior. I should also mention that I use the Google keyboard. Tried with English, Russian, and Greek - same result. Can you record a video to make sure that I've been doing the same thing?
Sure thing! Here's a video of it happening.
I cannot reproduce it with Google keyboard. I can reproduce it with Samsung keyboard.
Can confirm that I'm using a Samsung keyboard. I'm a bit busy at the moment, but could try to install a Google keyboard tomorrow to see if it helps. Though obviously, a lot of people use the default keyboard, so it'd be nice to find the root cause. I may have some time tomorrow to check if basic React examples suffer from the same issue.
Its common issue on android irrespective of browser, I've faced many times on many apps as well as websites, its usually the keyboard issue, changing/updating the keyboard fixes it for me. Related: https://support.google.com/sites/thread/49813073/why-the-texts-i-m-typing-are-automatically-repeating https://stackoverflow.com/questions/57736045/samsung-mobile-keyboard-duplicates-letters-with-onkeyup-listener https://r1.community.samsung.com/t5/galaxy-a/keyboard-typing-double-letters-or-too-many-letters/td-p/19914565/page/2 https://whatsabyte.com/android-keyboard-double-letters