mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Use KEYS.ESCAPE instead of "Escape"
Co-authored-by: DanielJGeiger <1852529+DanielJGeiger@users.noreply.github.com>
This commit is contained in:
parent
935c24f887
commit
ac46b431b2
1 changed files with 5 additions and 1 deletions
|
@ -3748,7 +3748,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||
}
|
||||
|
||||
// remove selections on escape press
|
||||
if (event.key === "Escape") {
|
||||
if (event.key === KEYS.ESCAPE) {
|
||||
// Don't deselect text right after editing it
|
||||
if (isWritableElement(event.target)) {
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
selectedElementIds: {},
|
||||
selectedGroupIds: {},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue