Use KEYS.ESCAPE instead of "Escape"

Co-authored-by: DanielJGeiger <1852529+DanielJGeiger@users.noreply.github.com>
This commit is contained in:
Jawahar S 2022-10-28 15:30:46 +05:30 committed by Andrew Aquino
parent 935c24f887
commit ac46b431b2

View file

@ -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: {},