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"
|
||||
:isReadOnly="isReadOnly"
|
||||
@change="valueChanged"
|
||||
@close="closeDialog"
|
||||
ref="inputFieldExpression"
|
||||
data-test-id="expression-modal-input"
|
||||
/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div ref="root" class="ph-no-capture"></div>
|
||||
<div ref="root" class="ph-no-capture" @keydown.stop @keydown.esc="onClose"></div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -82,6 +82,9 @@ export default mixins(expressionManager, workflowHelpers).extend({
|
|||
this.editor?.destroy();
|
||||
},
|
||||
methods: {
|
||||
onClose() {
|
||||
this.$emit('close');
|
||||
},
|
||||
itemSelected({ variable }: IVariableItemSelected) {
|
||||
if (!this.editor || this.isReadOnly) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue