fix(editor): Support tabbing away from inline expression editor (#5056)

 Support tabbing away from inline expression editor
This commit is contained in:
Iván Ovejero 2022-12-29 10:13:05 +01:00 committed by GitHub
parent 2e28f13a55
commit a2ab78f927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
<template>
<div :class="$style['expression-parameter-input']" v-click-outside="onBlur">
<div :class="$style['expression-parameter-input']" v-click-outside="onBlur" @keydown.tab="onBlur">
<div :class="[$style['all-sections'], { [$style['focused']]: isFocused }]">
<div
:class="[
@ -128,7 +128,7 @@ export default Vue.extend({
this.$emit('focus');
},
onBlur(event: FocusEvent) {
onBlur(event: FocusEvent | KeyboardEvent) {
if (
event.target instanceof Element &&
Array.from(event.target.classList).some((_class) => _class.includes('resizer'))