From 174e936e2acc2fefe7d868102648ba39ea034b89 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 14 Aug 2016 18:58:30 -0400 Subject: [PATCH] fix v-model on input[type=range] in IE (fix #3439) --- src/platforms/web/compiler/directives/model.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/platforms/web/compiler/directives/model.js b/src/platforms/web/compiler/directives/model.js index 90a705ae..887bfd07 100644 --- a/src/platforms/web/compiler/directives/model.js +++ b/src/platforms/web/compiler/directives/model.js @@ -1,5 +1,6 @@ /* @flow */ +import { isIE } from 'web/util/index' import { addHandler, addProp, getBindingAttr } from 'compiler/helpers' let warn @@ -96,7 +97,7 @@ function genDefaultModel ( const type = el.attrsMap.type const { lazy, number, trim } = modifiers || {} - const event = lazy ? 'change' : 'input' + const event = lazy || (isIE && type === 'range') ? 'change' : 'input' const needCompositionGuard = !lazy && type !== 'range' const isNative = el.tag === 'input' || el.tag === 'textarea'