Skip to content

Commit

Permalink
Prevent unecessary input trigger with v-model
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed May 3, 2017
1 parent b977c77 commit e83f1e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/platforms/web/runtime/directives/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ function onCompositionStart (e) {
}

function onCompositionEnd (e) {
// prevent triggering an input event for no reason
if (!e.target.composing) return
e.target.composing = false
trigger(e.target, 'input')
}
Expand Down

0 comments on commit e83f1e4

Please sign in to comment.