reagent

hypirion 2025-03-28T21:27:46.177609Z

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 🤷 ).

p-himik 2025-03-28T21:59:07.862459Z

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.

hypirion 2025-03-28T22:04:30.010439Z

My setup is Chrome 134.0.6998.135 on Android 14, Galaxy S24.

p-himik 2025-03-29T04:54:59.005549Z

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?

hypirion 2025-03-29T17:30:01.015589Z

Sure thing! Here's a video of it happening.

😮 1
p-himik 2025-03-29T17:32:55.800249Z

I cannot reproduce it with Google keyboard. I can reproduce it with Samsung keyboard.

hypirion 2025-03-29T17:53:38.068519Z

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.