Skip to content

Commit 49f721b

Browse files
committed
Force numeric keyboard input on mobile
1 parent 7674f91 commit 49f721b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/directive.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
const options = Object.assign(core.cloneDeep(defaultOptions), value, modifiers)
1010
const { reverseFill, precision, decimal } = options
1111
el.options = options
12+
el.setAttribute('inputmode', 'numeric')
1213
if (reverseFill && el.value) {
1314
el.value = parseFloat(new NumberFormat({ ...options, reverseFill: false }).unformat(el.value)).toFixed(precision)
1415
if (vnode?.props?.value) {

0 commit comments

Comments
 (0)