mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-16 15:16:38 +00:00
UploadArea should only preventDefault for Escape
This will make accessibility for some things less effortful, since we won't have to define a prior event handler to do whatever should be happening by default.
This commit is contained in:
parent
cb42dd8497
commit
173a970752
|
@ -12,13 +12,12 @@ export default class UploadArea extends React.PureComponent {
|
|||
};
|
||||
|
||||
handleKeyUp = (e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const keyCode = e.keyCode;
|
||||
if (this.props.active) {
|
||||
switch(keyCode) {
|
||||
case 27:
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.props.onClose();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue