Price setting should be consistent with the send input box and disable the wheel event, because this
can cause users to scroll down and quickly click list etoken after entering a price, by which time the price has
already changed. Similar cases have occurred several times recently. Since preventing the event doesn't work
here, a safer method of blur (losing focus) was used.
Details
- Reviewers
bytesofman emack - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) Restricted Project
Local demo testing
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- alita0513
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 33286 Build 66054: Build Diff cashtab-tests Build 66053: arc lint + arc unit
Event Timeline
this exists in a few spots in Cashtab, and is correctly fixed on the latest input -- the one on the Receive screen
Please use that same approach, i.e. keep onWheel here, but also any number input should be type="number" (set where the component is used, not in Inputs.tsx, if it is indeed a number input) -- in this way mobile users get the number pad instead of the keyboard
Pass in the type. Here, unlike elsewhere where used text, I used number by default here. This component is
currently only used in these two places.
cashtab/src/components/Common/Inputs.tsx | ||
---|---|---|
553 ↗ | (On Diff #53981) | oh i see ok so this input was already hardcoded as a number input in that case, please revert all this type passing...the rev1 version of the diff is good and could land as-is (only adding onWheel with no other changes, i.e. https://reviews.bitcoinabc.org/D18085?vs=on&id=53966#toc This is a quick patch. However it needs to be part of some more diffs. The big problem: Cashtab has "solved" the scroll number problem on some inputs by making them type="text" ... which is fine on desktop, but makes mobile input tedious. Instead, all number-only inputs should be number type and have this onWheel scroll prevention. For example this is what the agora quantity inputs are like when listing a token. we should also tho make the quantity inputs type="number" with the same onWheel scroll prevention -- could do that in this diff or make it a separate diff. |