Merge pull request #2336 from rounce/master

input: on paste
This commit is contained in:
Samuel Georges 2017-02-03 06:47:21 +11:00 committed by GitHub
commit 3bc87fb945
1 changed files with 6 additions and 0 deletions

View File

@ -256,6 +256,12 @@
$el.val(prefix + self.formatValue()).trigger('oc.inputPreset.afterUpdate')
})
this.$src.on('paste', function() {
if (self.cancelled)
return
setTimeout(function() {$el.val(prefix + self.formatValue())}, 100)
})
this.$el.on('change', function() {
self.cancelled = true