mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Remove all active selections on pressing ESC key
This commit is contained in:
parent
b7babe554b
commit
935c24f887
1 changed files with 11 additions and 0 deletions
|
@ -3747,6 +3747,17 @@ class App extends React.Component<AppProps, AppState> {
|
|||
}, 100);
|
||||
}
|
||||
|
||||
// remove selections on escape press
|
||||
if (event.key === "Escape") {
|
||||
this.setState({
|
||||
selectedElementIds: {},
|
||||
selectedGroupIds: {},
|
||||
editingGroupId: null,
|
||||
});
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
// prevent browser zoom in input fields
|
||||
if (event[KEYS.CTRL_OR_CMD] && isWritableElement(event.target)) {
|
||||
if (event.code === CODES.MINUS || event.code === CODES.EQUAL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue