Skip to content

Commit

Permalink
Force numeric keyboard input on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
dipaksarkar committed Sep 14, 2023
1 parent 7674f91 commit 49f721b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
const options = Object.assign(core.cloneDeep(defaultOptions), value, modifiers)
const { reverseFill, precision, decimal } = options
el.options = options
el.setAttribute('inputmode', 'numeric')
if (reverseFill && el.value) {
el.value = parseFloat(new NumberFormat({ ...options, reverseFill: false }).unformat(el.value)).toFixed(precision)
if (vnode?.props?.value) {
Expand Down

0 comments on commit 49f721b

Please sign in to comment.