This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-09
Channels
- # announcements (1)
- # babashka (14)
- # calva (8)
- # chlorine-clover (3)
- # clerk (6)
- # clj-kondo (27)
- # cljdoc (20)
- # clojars (6)
- # clojure (53)
- # clojure-denver (8)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (270)
- # clojure-uk (5)
- # clojurescript (35)
- # community-development (7)
- # cursive (12)
- # datalevin (3)
- # datomic (26)
- # etaoin (23)
- # exercism (1)
- # hyperfiddle (3)
- # java (14)
- # nrepl (2)
- # off-topic (12)
- # pathom (3)
- # portal (44)
- # practicalli (2)
- # reagent (7)
- # releases (1)
- # shadow-cljs (13)
- # timbre (3)
- # xtdb (4)
Let's say that you implement an input element's onChange for updating a Reagent atom that triggers a change for displaying the count of characters entered somewhere on your UI. The undo behavior of the input element is altered, in a way that it undoes one character at a time, instead of the default behavior of undoing chunks of characters that were entered together. This is probably due to the delayed nature of Reagent UI updates. Has anybody seen this? Can this be avoided?
You should be able to go around Reagents workaround by creating a input element directly with React call: (react/createElement "input" #js {...} ...)
(but then you need to handle other problems yourself.)
The issue is not because of the ReagentInput wrapper. It will also happen with a standard React input.
It seems to be the delayed UI update that makes the browser delimit the action to undo.
Sorry guys, I'm not seeing the same behavior today. I'm not sure when the problem manifests.
It may only happen when the input is controlled.