1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-24 22:36:19 -04:00

Scrolling and hotkey improvements

New: Use Esc/Enter for cancel/accept in confirmation modals
Fixed: Modals focused when opened
Fixed: Scrolling with keyboard unless focus is shifted out of scrollable area
Closes #3291
This commit is contained in:
Mark McDowall
2020-03-01 21:03:38 -08:00
parent 52e5d4d0f1
commit 506023b0f3
7 changed files with 108 additions and 27 deletions
@@ -23,6 +23,8 @@ class Scroller extends Component {
if (this.props.scrollTop != null) {
this._scroller.scrollTop = scrollTop;
}
this._scroller.focus({ preventScroll: true });
}
//
@@ -58,6 +60,7 @@ class Scroller extends Component {
styles[scrollDirection],
autoScroll && styles.autoScroll
)}
tabIndex={-1}
{...otherProps}
>
{children}