fix: disable flowchart keybindings inside inputs (#8353)

This commit is contained in:
David Luzar 2024-08-09 18:44:17 +02:00 committed by GitHub
parent 99b91c46f7
commit 87a9430809
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 76 additions and 69 deletions

View File

@ -3887,7 +3887,11 @@ class App extends React.Component<AppProps, AppState> {
});
}
if (event.key === KEYS.ESCAPE && this.flowChartCreator.isCreatingChart) {
if (!isInputLike(event.target)) {
if (
event.key === KEYS.ESCAPE &&
this.flowChartCreator.isCreatingChart
) {
this.flowChartCreator.clear();
this.triggerRender(true);
return;
@ -3943,7 +3947,9 @@ class App extends React.Component<AppProps, AppState> {
),
}));
const nextNode = this.scene.getNonDeletedElementsMap().get(nextId);
const nextNode = this.scene
.getNonDeletedElementsMap()
.get(nextId);
if (
nextNode &&
@ -3970,6 +3976,7 @@ class App extends React.Component<AppProps, AppState> {
return;
}
}
}
if (
event[KEYS.CTRL_OR_CMD] &&