Samsung '-' key missing on keyboard.
This commit is contained in:
@@ -32,6 +32,11 @@ const styles = ({ palette }: Theme) => createStyles({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function isSamsungDevice() {
|
||||||
|
const userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
return userAgent.includes('samsung') || userAgent.includes('sm-');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
interface NumericInputProps extends WithStyles<typeof styles> {
|
interface NumericInputProps extends WithStyles<typeof styles> {
|
||||||
ariaLabel: string;
|
ariaLabel: string;
|
||||||
@@ -155,9 +160,14 @@ export const NumericInput =
|
|||||||
inputProps={{
|
inputProps={{
|
||||||
'aria-label': this.props.ariaLabel,
|
'aria-label': this.props.ariaLabel,
|
||||||
style: { textAlign: 'right' },
|
style: { textAlign: 'right' },
|
||||||
"min": this.props.min,
|
type: isSamsungDevice()? "text": "number",
|
||||||
"max": this.props.max,
|
inputMode: "decimal",
|
||||||
"step:": this.props.step
|
autoComplete: "off",
|
||||||
|
autoCorrect: "off",
|
||||||
|
autoCapitalize: "off",
|
||||||
|
min: this.props.min,
|
||||||
|
max: this.props.max,
|
||||||
|
step: this.props.step
|
||||||
}}
|
}}
|
||||||
onFocus={(e) => {this.handleFocus(e);}}
|
onFocus={(e) => {this.handleFocus(e);}}
|
||||||
onBlur= {(e) => { this.handleBlur(e); }}
|
onBlur= {(e) => { this.handleBlur(e); }}
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ const MAX_ANGLE = 135;
|
|||||||
const FONT_SIZE = "0.8em";
|
const FONT_SIZE = "0.8em";
|
||||||
|
|
||||||
|
|
||||||
|
function isSamsungDevice() {
|
||||||
|
const userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
return userAgent.includes('samsung') || userAgent.includes('sm-');
|
||||||
|
}
|
||||||
|
|
||||||
enum ButtonStyle { None, Trigger, Momentary, MomentaryOnByDefault }
|
enum ButtonStyle { None, Trigger, Momentary, MomentaryOnByDefault }
|
||||||
|
|
||||||
|
|
||||||
@@ -1089,7 +1094,7 @@ const PluginControl =
|
|||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<Input key={value}
|
<Input key={value}
|
||||||
type="number"
|
type={isSamsungDevice()? "text": "number"} inputMode="decimal"
|
||||||
defaultValue={control.formatShortValue(value)}
|
defaultValue={control.formatShortValue(value)}
|
||||||
error={this.state.error}
|
error={this.state.error}
|
||||||
inputProps={{
|
inputProps={{
|
||||||
|
|||||||
Reference in New Issue
Block a user