Samsung '-' key missing on keyboard.

This commit is contained in:
Robin E. R. Davies
2025-09-05 17:54:57 -04:00
parent e6733ec036
commit 7005cb6d1f
2 changed files with 19 additions and 4 deletions
+13 -3
View File
@@ -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> {
ariaLabel: string;
@@ -155,9 +160,14 @@ export const NumericInput =
inputProps={{
'aria-label': this.props.ariaLabel,
style: { textAlign: 'right' },
"min": this.props.min,
"max": this.props.max,
"step:": this.props.step
type: isSamsungDevice()? "text": "number",
inputMode: "decimal",
autoComplete: "off",
autoCorrect: "off",
autoCapitalize: "off",
min: this.props.min,
max: this.props.max,
step: this.props.step
}}
onFocus={(e) => {this.handleFocus(e);}}
onBlur= {(e) => { this.handleBlur(e); }}