diff options
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/upload_area.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/upload_area.js | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/app/javascript/mastodon/features/ui/components/upload_area.js b/app/javascript/mastodon/features/ui/components/upload_area.js index c5710ee69..c7d109a33 100644 --- a/app/javascript/mastodon/features/ui/components/upload_area.js +++ b/app/javascript/mastodon/features/ui/components/upload_area.js @@ -5,13 +5,12 @@ import { FormattedMessage } from 'react-intl'; class UploadArea extends React.PureComponent { - constructor (props, context) { - super(props, context); + static propTypes = { + active: PropTypes.bool, + onClose: PropTypes.func + }; - this.handleKeyUp = this.handleKeyUp.bind(this); - } - - handleKeyUp (e) { + handleKeyUp = (e) => { e.preventDefault(); e.stopPropagation(); @@ -52,9 +51,4 @@ class UploadArea extends React.PureComponent { } -UploadArea.propTypes = { - active: PropTypes.bool, - onClose: PropTypes.func -}; - export default UploadArea; |