diff options
author | Surinna Curtis <ekiru.0@gmail.com> | 2017-08-31 22:32:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 22:32:03 -0500 |
commit | 173a970752ed8c86ee9323d33ba7eb8b44fe119f (patch) | |
tree | 8119733c4635ef17fe7eb706c2c2f0cc6d1522aa /app | |
parent | cb42dd8497a88523b4a1395a61027f0ee9af78d6 (diff) |
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.
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/upload_area.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/ui/components/upload_area.js b/app/javascript/mastodon/features/ui/components/upload_area.js index 030c3db2e..dda28feeb 100644 --- a/app/javascript/mastodon/features/ui/components/upload_area.js +++ b/app/javascript/mastodon/features/ui/components/upload_area.js @@ -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; } |