mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-23 10:32:17 -08:00
⚡ Update click outside events to limit only to click events, ignoring blur (#1953)
This commit is contained in:
parent
38f0cc1a8f
commit
a080fab1f1
|
@ -10,7 +10,7 @@
|
|||
@keydown.esc="onEscape"
|
||||
ref="input"
|
||||
size="4"
|
||||
v-click-outside="onBlur"
|
||||
v-click-outside="onClickOutside"
|
||||
/>
|
||||
</ExpandableInputBase>
|
||||
</template>
|
||||
|
@ -47,8 +47,10 @@ export default Vue.extend({
|
|||
onEnter() {
|
||||
this.$emit('enter', (this.$refs.input as HTMLInputElement).value);
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur', (this.$refs.input as HTMLInputElement).value);
|
||||
onClickOutside(e: Event) {
|
||||
if (e.type === 'click') {
|
||||
this.$emit('blur', (this.$refs.input as HTMLInputElement).value);
|
||||
}
|
||||
},
|
||||
onEscape() {
|
||||
this.$emit('esc');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div>
|
||||
<SlideTransition>
|
||||
<div class="node-creator" v-if="active" v-click-outside="closeCreator">
|
||||
<div class="node-creator" v-if="active" v-click-outside="onClickOutside">
|
||||
<MainPanel @nodeTypeSelected="nodeTypeSelected" :categorizedItems="categorizedItems" :categoriesWithNodes="categoriesWithNodes" :searchItems="searchItems"></MainPanel>
|
||||
</div>
|
||||
</SlideTransition>
|
||||
|
@ -64,8 +64,10 @@ export default Vue.extend({
|
|||
},
|
||||
},
|
||||
methods: {
|
||||
closeCreator () {
|
||||
this.$emit('closeNodeCreator');
|
||||
onClickOutside (e: Event) {
|
||||
if (e.type === 'click') {
|
||||
this.$emit('closeNodeCreator');
|
||||
}
|
||||
},
|
||||
nodeTypeSelected (nodeTypeName: string) {
|
||||
this.$emit('nodeTypeSelected', nodeTypeName);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div :class="{'tags-container': true, focused}" @keydown.stop v-click-outside="onBlur">
|
||||
<div :class="{'tags-container': true, focused}" @keydown.stop v-click-outside="onClickOutside">
|
||||
<el-select
|
||||
:popperAppendToBody="false"
|
||||
:value="appliedTags"
|
||||
|
@ -215,8 +215,10 @@ export default mixins(showMessage).extend({
|
|||
this.focusOnInput();
|
||||
});
|
||||
},
|
||||
onBlur() {
|
||||
this.$emit('blur');
|
||||
onClickOutside(e: Event) {
|
||||
if (e.type === 'click') {
|
||||
this.$emit('blur');
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
Loading…
Reference in a new issue