diff options
Diffstat (limited to 'app/javascript/mastodon/components/column_back_button.js')
-rw-r--r-- | app/javascript/mastodon/components/column_back_button.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/column_back_button.js b/app/javascript/mastodon/components/column_back_button.js index 5b7a89d56..8a60c4192 100644 --- a/app/javascript/mastodon/components/column_back_button.js +++ b/app/javascript/mastodon/components/column_back_button.js @@ -8,19 +8,20 @@ export default class ColumnBackButton extends React.PureComponent { router: PropTypes.object, }; - handleClick = (e) => { - if (!e.key || e.key === 'Enter') { - if (window.history && window.history.length === 1) this.context.router.history.push('/'); - else this.context.router.history.goBack(); + handleClick = () => { + if (window.history && window.history.length === 1) { + this.context.router.history.push('/'); + } else { + this.context.router.history.goBack(); } } render () { return ( - <div role='button' tabIndex='0' onClick={this.handleClick} onKeyDown={this.handleClick} className='column-back-button'> + <button onClick={this.handleClick} className='column-back-button'> <i className='fa fa-fw fa-chevron-left column-back-button__icon' /> <FormattedMessage id='column_back_button.label' defaultMessage='Back' /> - </div> + </button> ); } |