mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix: Prevent keyboard shortcuts in expression editor modal (#4984)
* fix: prevent keyboard shortcuts in expression editor modal * support esc
This commit is contained in:
parent
c41c707654
commit
29364ea702
|
@ -47,6 +47,7 @@
|
||||||
:value="value"
|
:value="value"
|
||||||
:isReadOnly="isReadOnly"
|
:isReadOnly="isReadOnly"
|
||||||
@change="valueChanged"
|
@change="valueChanged"
|
||||||
|
@close="closeDialog"
|
||||||
ref="inputFieldExpression"
|
ref="inputFieldExpression"
|
||||||
data-test-id="expression-modal-input"
|
data-test-id="expression-modal-input"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div ref="root" class="ph-no-capture"></div>
|
<div ref="root" class="ph-no-capture" @keydown.stop @keydown.esc="onClose"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
@ -82,6 +82,9 @@ export default mixins(expressionManager, workflowHelpers).extend({
|
||||||
this.editor?.destroy();
|
this.editor?.destroy();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onClose() {
|
||||||
|
this.$emit('close');
|
||||||
|
},
|
||||||
itemSelected({ variable }: IVariableItemSelected) {
|
itemSelected({ variable }: IVariableItemSelected) {
|
||||||
if (!this.editor || this.isReadOnly) return;
|
if (!this.editor || this.isReadOnly) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue