resolve issue related to event handler

This commit is contained in:
Xiaofeng An 2019-02-13 07:38:53 -05:00
parent 2100cb247d
commit 98c27fd812

View file

@ -13,11 +13,11 @@
@keydown.shift.tab="cycleBackward" @keydown.shift.tab="cycleBackward"
@keydown.tab="cycleForward" @keydown.tab="cycleForward"
@keydown.enter="replaceCandidate" @keydown.enter="replaceCandidate"
@drop="drop && drop()" @drop="drop && drop($event)"
@dragover.prevent="dragoverPrevent && dragoverPrevent()" @dragover.prevent="dragoverPrevent && dragoverPrevent($event)"
@paste="paste && paste()" @paste="paste && paste($event)"
@keydown.meta.enter="keydownMetaEnter && keydownMetaEnter()" @keydown.meta.enter="keydownMetaEnter && keydownMetaEnter($event)"
@keyup.ctrl.enter="keyupCtrlEnter && keyupCtrlEnter()"> @keyup.ctrl.enter="keyupCtrlEnter && keyupCtrlEnter($event)">
</textarea> </textarea>
<input <input
v-else v-else
@ -31,11 +31,11 @@
@keydown.shift.tab="cycleBackward" @keydown.shift.tab="cycleBackward"
@keydown.tab="cycleForward" @keydown.tab="cycleForward"
@keydown.enter="replaceCandidate" @keydown.enter="replaceCandidate"
@drop="drop && drop()" @drop="drop && drop($event)"
@dragover.prevent="dragoverPrevent && dragoverPrevent()" @dragover.prevent="dragoverPrevent && dragoverPrevent($event)"
@paste="paste && paste()" @paste="paste && paste($event)"
@keydown.meta.enter="keydownMetaEnter && keydownMetaEnter()" @keydown.meta.enter="keydownMetaEnter && keydownMetaEnter($event)"
@keyup.ctrl.enter="keyupCtrlEnter && keyupCtrlEnter()"/> @keyup.ctrl.enter="keyupCtrlEnter && keyupCtrlEnter($event)"/>
<div style="position:relative;" v-if="candidates"> <div style="position:relative;" v-if="candidates">
<div class="autocomplete-panel"> <div class="autocomplete-panel">
<div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))"> <div v-for="candidate in candidates" @click="replace(candidate.utf || (candidate.screen_name + ' '))">