Skip to content

Commit c54d4e6

Browse files
jcperez-chrstoenescu
authored andcommitted
feat: QInput | Add v-on:paste event handler (quasarframework#2433)
1 parent 5d85a81 commit c54d4e6

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/components/input/QInput.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ export default {
297297
focus: this.__onFocus,
298298
blur: this.__onInputBlur,
299299
keydown: this.__onKeydown,
300-
keyup: this.__onKeyup
300+
keyup: this.__onKeyup,
301+
paste: this.__onPaste
301302
}
302303
})
303304
])
@@ -322,6 +323,7 @@ export default {
322323
blur: this.__onInputBlur,
323324
keydown: this.__onKeydown,
324325
keyup: this.__onKeyup,
326+
paste: this.__onPaste,
325327
animationstart: this.__onAnimationStart
326328
}
327329
})
@@ -344,7 +346,8 @@ export default {
344346
props: this.frameProps,
345347
on: {
346348
click: this.__onClick,
347-
focus: this.__onFocus
349+
focus: this.__onFocus,
350+
paste: this.__onPaste
348351
}
349352
},
350353
[].concat(this.$slots.before).concat([

src/components/search/QSearch.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export default {
135135
keyup: this.__onKeyup,
136136
keydown: this.__onKeydown,
137137
click: this.__onClick,
138+
paste: this.__onPaste,
138139
clear: val => {
139140
this.$emit('clear', val)
140141
this.__emit()

src/mixins/input.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export default {
7979
__onClick (e) {
8080
this.focus()
8181
this.$emit('click', e)
82+
},
83+
__onPaste (e) {
84+
this.$emit('paste', e)
8285
}
8386
},
8487
mounted () {

0 commit comments

Comments
 (0)