From 3192990874274727084ca793c39176d1635b57f7 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 1 Apr 2023 22:08:02 -0700 Subject: [PATCH] Fixed: Number input changing while scrolling (cherry picked from commit cc46ed56b4b70fe1f1443c0a927383f19c989c47) --- frontend/src/Components/Form/TextInput.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/Components/Form/TextInput.js b/frontend/src/Components/Form/TextInput.js index e2808ce54..e018dd5a3 100644 --- a/frontend/src/Components/Form/TextInput.js +++ b/frontend/src/Components/Form/TextInput.js @@ -112,6 +112,12 @@ class TextInput extends Component { this._isMouseTarget = false; }; + onWheel = () => { + if (this.props.type === 'number') { + this._input.blur(); + } + }; + // // Render @@ -161,6 +167,7 @@ class TextInput extends Component { onKeyUp={this.onKeyUp} onMouseDown={this.onMouseDown} onMouseUp={this.onMouseUp} + onWheel={this.onWheel} /> ); }