ソースを参照

fix IE10/11 v-model infinite bouncing (ref: #592)

Evan You 11 年 前
コミット
c7a28d505c
1 ファイル変更6 行追加0 行削除
  1. 6 0
      src/directives/model/default.js

+ 6 - 0
src/directives/model/default.js

@@ -51,6 +51,12 @@ module.exports = {
             // the cursor was at
             // the cursor was at
             charsOffset = el.value.length - el.selectionStart
             charsOffset = el.value.length - el.selectionStart
           } catch (e) {}
           } catch (e) {}
+          // Fix IE10/11 infinite update cycle
+          // https://github.com/yyx990803/vue/issues/592
+          /* istanbul ignore if */
+          if (charsOffset < 0) {
+            return
+          }
           set()
           set()
           _.nextTick(function () {
           _.nextTick(function () {
             // force a value update, because in
             // force a value update, because in