Skip to content

Commit 174e936

Browse files
committed
fix v-model on input[type=range] in IE (fix #3439)
1 parent 854ccce commit 174e936

File tree

1 file changed

+2
-1
lines changed
  • src/platforms/web/compiler/directives

1 file changed

+2
-1
lines changed

Diff for: src/platforms/web/compiler/directives/model.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* @flow */
22

3+
import { isIE } from 'web/util/index'
34
import { addHandler, addProp, getBindingAttr } from 'compiler/helpers'
45

56
let warn
@@ -96,7 +97,7 @@ function genDefaultModel (
9697

9798
const type = el.attrsMap.type
9899
const { lazy, number, trim } = modifiers || {}
99-
const event = lazy ? 'change' : 'input'
100+
const event = lazy || (isIE && type === 'range') ? 'change' : 'input'
100101
const needCompositionGuard = !lazy && type !== 'range'
101102
const isNative = el.tag === 'input' || el.tag === 'textarea'
102103

0 commit comments

Comments
 (0)