mirror of
https://github.com/maputnik/editor.git
synced 2026-01-06 21:40:01 +00:00
Safari fixes.
This commit is contained in:
@@ -134,7 +134,7 @@ class NumberInput extends React.Component {
|
|||||||
// Clamp between min/max
|
// Clamp between min/max
|
||||||
value = Math.max(this.props.min, Math.min(this.props.max, value));
|
value = Math.max(this.props.min, Math.min(this.props.max, value));
|
||||||
|
|
||||||
this.setState({editing: true, value, dirtyValue});
|
this.setState({value, dirtyValue});
|
||||||
this.props.onChange(value);
|
this.props.onChange(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -162,6 +162,13 @@ class NumberInput extends React.Component {
|
|||||||
onKeyDown={() => {
|
onKeyDown={() => {
|
||||||
this._keyboardEvent = true;
|
this._keyboardEvent = true;
|
||||||
}}
|
}}
|
||||||
|
onPointerDown={() => {
|
||||||
|
this.setState({editing: true});
|
||||||
|
}}
|
||||||
|
onPointerUp={() => {
|
||||||
|
// Safari doesn't get onBlur event
|
||||||
|
this.setState({editing: false});
|
||||||
|
}}
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
this.setState({editing: false});
|
this.setState({editing: false});
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user