diff --git a/app/soapbox/components/column.js b/app/soapbox/components/column.js index a8aec1542..1b5fabb05 100644 --- a/app/soapbox/components/column.js +++ b/app/soapbox/components/column.js @@ -11,6 +11,10 @@ export default class Column extends React.PureComponent { label: PropTypes.string, }; + setRef = c => { + this.node = c; + } + render() { const { className, label, children, transparent, ...rest } = this.props; @@ -20,6 +24,7 @@ export default class Column extends React.PureComponent { aria-label={label} className={classNames('column', className, { 'column--transparent': transparent })} {...rest} + ref={this.setRef} > {children} diff --git a/app/soapbox/components/scrollable_list.js b/app/soapbox/components/scrollable_list.js index 9617d1c68..4a2164b47 100644 --- a/app/soapbox/components/scrollable_list.js +++ b/app/soapbox/components/scrollable_list.js @@ -22,7 +22,7 @@ const mapStateToProps = state => { }; }; -export default @connect(mapStateToProps) +export default @connect(mapStateToProps, null, null, { forwardRef: true }) class ScrollableList extends PureComponent { static contextTypes = { diff --git a/app/soapbox/components/sidebar_menu.js b/app/soapbox/components/sidebar_menu.js index ad6b2b022..70cc1cd90 100644 --- a/app/soapbox/components/sidebar_menu.js +++ b/app/soapbox/components/sidebar_menu.js @@ -149,6 +149,10 @@ class SidebarMenu extends ImmutablePureComponent { if (accountChanged || otherAccountsChanged) { this.fetchOwnAccounts(); } + + if (this.props.sidebarOpen && !prevProps.sidebarOpen) { + document.querySelector('.sidebar-menu__close').focus(); + } } renderAccount = account => { diff --git a/app/soapbox/features/notifications/components/notification.js b/app/soapbox/features/notifications/components/notification.js index 2470cc13b..b16d0b542 100644 --- a/app/soapbox/features/notifications/components/notification.js +++ b/app/soapbox/features/notifications/components/notification.js @@ -174,7 +174,7 @@ class Notification extends ImmutablePureComponent { renderMention(notification) { return ( -