Final fix for Samsung missing '-" on keyboard.

This commit is contained in:
Robin E. R. Davies
2025-09-06 04:45:22 -04:00
parent 7005cb6d1f
commit 06a19e2f69
2 changed files with 10 additions and 10 deletions
+5 -6
View File
@@ -32,11 +32,10 @@ const styles = ({ palette }: Theme) => createStyles({
});
function isSamsungDevice() {
const userAgent = navigator.userAgent.toLowerCase();
return userAgent.includes('samsung') || userAgent.includes('sm-');
}
function isMobileDevice() {
return (navigator.maxTouchPoints && navigator.maxTouchPoints > 1);
}
interface NumericInputProps extends WithStyles<typeof styles> {
ariaLabel: string;
@@ -160,8 +159,8 @@ export const NumericInput =
inputProps={{
'aria-label': this.props.ariaLabel,
style: { textAlign: 'right' },
type: isSamsungDevice()? "text": "number",
inputMode: "decimal",
type: isMobileDevice()? "text": "number", // Avoids missing minus sign on Samsung mobile keyboard.
inputMode: "numeric",
autoComplete: "off",
autoCorrect: "off",
autoCapitalize: "off",