Skip to content

Commit 33150ea

Browse files
committed
fix safari issue
1 parent a1ec276 commit 33150ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function blurHandler(event: Event) {
182182
updateValue(target, null, { force: true, emit: false, clean: true })
183183

184184
if (oldValue !== target.value) {
185-
target.dispatchEvent(InputEvent('change'))
185+
target.dispatchEvent(InputEvent('input'))
186186
}
187187
}
188188

src/directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ export default {
4949

5050
updated: (el: core.CustomInputElement, { value, oldValue, modifiers }: DirectiveBinding, vnode: VNode) => {
5151
el = core.getInputElement(el)
52-
const options = el.options
53-
el.options = Object.assign(options, value, modifiers)
5452
if (value !== oldValue) {
53+
const options = el.options
54+
el.options = Object.assign(options, value, modifiers)
5555
core.updateValue(el, vnode, { force: true, clean: true })
5656
} else {
5757
core.updateValue(el, vnode)

0 commit comments

Comments
 (0)