diff --git a/vite/src/pipedal/NumericInput.tsx b/vite/src/pipedal/NumericInput.tsx index a2c8dd9..cd89c58 100644 --- a/vite/src/pipedal/NumericInput.tsx +++ b/vite/src/pipedal/NumericInput.tsx @@ -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 { 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); }} diff --git a/vite/src/pipedal/PluginControl.tsx b/vite/src/pipedal/PluginControl.tsx index 7112056..8dcdf13 100644 --- a/vite/src/pipedal/PluginControl.tsx +++ b/vite/src/pipedal/PluginControl.tsx @@ -48,6 +48,11 @@ const MAX_ANGLE = 135; 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 } @@ -1089,7 +1094,7 @@ const PluginControl = ) : (