mirror of
https://github.com/mastodon/mastodon.git
synced 2026-10-02 23:19:52 -05:00
Fix “enter” key closing modals (#40757)
This commit is contained in:
@@ -54,7 +54,7 @@ class ModalRoot extends PureComponent {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
} else if (key === 'enter' && !e.defaultPrevented && !!this.props.children) {
|
||||
} else if (key === 'escape' && !e.defaultPrevented && !!this.props.children) {
|
||||
this.props.onClose();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user