@@ -92,6 +92,8 @@ export function updateCursor(el: HTMLInputElement, position: number) {
9292 * @param {Boolean } options.force Forces the update even if the old value and the new value are the same
9393 */
9494export function updateValue ( el : CustomInputElement , vnode : VNode | null , { emit = true , force = false , clean = false } = { } ) {
95+ // console.log('updateValue', arguments)
96+
9597 const { options, oldValue } = el
9698 const { reverseFill, max, min } = options
9799 const currentValue = vnode ?. props ?. value || el . value
@@ -110,9 +112,9 @@ export function updateValue(el: CustomInputElement, vnode: VNode | null, { emit
110112 masked = number . format ( min )
111113 unmasked = min . toString ( )
112114 }
113- el . oldValue = masked
114115 }
115116
117+ el . oldValue = masked
116118 el . unmasked = unmasked
117119
118120 // safari makes the cursor jump to the end if el.value gets assign even if to the same value
@@ -149,7 +151,7 @@ export function inputHandler(event: CustomInputEvent) {
149151 positionFromEnd = target . value . length - target . selectionEnd
150152 }
151153
152- updateValue ( target , null , { clean : ! options . precision } )
154+ updateValue ( target , null , { clean : ! options . precision , emit : false } )
153155
154156 // updated cursor position
155157 if ( options . suffix ) {
@@ -176,10 +178,10 @@ export function blurHandler(event: CustomInputEvent) {
176178
177179 const { oldValue } = target
178180
179- updateValue ( target , null , { force : true , clean : true } )
181+ updateValue ( target , null , { force : true , clean : true , emit : false } )
180182
181183 if ( oldValue !== target . value ) {
182- target . dispatchEvent ( InputEvent ( 'change ' ) )
184+ target . dispatchEvent ( InputEvent ( 'input ' ) )
183185 }
184186}
185187
0 commit comments