mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 01:25:27 +01:00
Safari fixes.
This commit is contained in:
parent
0726a494be
commit
d5ef412300
1 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,7 @@ class NumberInput extends React.Component {
|
|||
// Clamp between min/max
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -162,6 +162,13 @@ class NumberInput extends React.Component {
|
|||
onKeyDown={() => {
|
||||
this._keyboardEvent = true;
|
||||
}}
|
||||
onPointerDown={() => {
|
||||
this.setState({editing: true});
|
||||
}}
|
||||
onPointerUp={() => {
|
||||
// Safari doesn't get onBlur event
|
||||
this.setState({editing: false});
|
||||
}}
|
||||
onBlur={() => {
|
||||
this.setState({editing: false});
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue