Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Prevent text edit dialog from re-opening in same tick #6781

Merged
merged 4 commits into from
Jul 31, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/editor-ui/src/components/ParameterInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ export default defineComponent({
remoteParameterOptionsLoading: false,
remoteParameterOptionsLoadingIssues: null as string | null,
textEditDialogVisible: false,
editDialogClosing: false,
tempValue: '', // el-date-picker and el-input does not seem to work without v-model so add one
CUSTOM_API_CALL_KEY,
activeCredentialType: '',
Expand Down Expand Up @@ -922,6 +923,11 @@ export default defineComponent({
},
closeCodeEditDialog() {
this.codeEditDialogVisible = false;

this.editDialogClosing = true;
void this.$nextTick(() => {
this.editDialogClosing = false;
});
},
closeExpressionEditDialog() {
this.expressionEditDialogVisible = false;
Expand All @@ -945,8 +951,17 @@ export default defineComponent({
},
closeTextEditDialog() {
this.textEditDialogVisible = false;

this.editDialogClosing = true;
void this.$nextTick(() => {
this.editDialogClosing = false;
});
},
displayEditDialog() {
if (this.editDialogClosing) {
return;
}

if (this.editorType) {
this.codeEditDialogVisible = true;
} else {
Expand Down
Loading