Skip to content

Commit

Permalink
Link explanation in comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nishasy committed Aug 5, 2024
1 parent 9a695c8 commit a1d54f4
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import type {PropsFor} from "@khanacademy/wonder-blocks-core";
* without scrolling the page.
*
* NOTE 1: Native HTML number inputs do not update the number value on scroll,
* they only scroll the page. For some reason, inputs in React do NOT work
* this way. By default, scrolling on a focused number input in React causes
* BOTH the input value to change AND the page to scroll. The behavior in
* this component is an improvement on the React behavior, but it's the
* opposite of the native HTML behavior.
* they only scroll the page. Inputs in React do NOT work this way (explanation
* here: https://stackoverflow.com/a/68266494). By default, scrolling on a
* focused number input in React causes BOTH the input value to change AND
* the page to scroll. The behavior in this component is an improvement on
* the React behavior, but it's the opposite of the native HTML behavior.
*
* NOTE 2: Firefox seems to have a custom override for this. Even with this
* stopPropogation, Firefox matches the native HTML behavior.
Expand Down

0 comments on commit a1d54f4

Please sign in to comment.