File tree Expand file tree Collapse file tree
lib/global/event-handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 4.7.2 (unreleased)
4+
5+ - [ 683] ( https://github.com/bvaughn/react-resizable-panels/pull/683 ) : Don't scroll separator when setting focus
6+
37## 4.7.1
48
59- [ 678] ( https://github.com/bvaughn/react-resizable-panels/pull/678 ) : Change default overflow styles to support shadows
Original file line number Diff line number Diff line change @@ -120,7 +120,9 @@ export function onDocumentKeyDown(event: KeyboardEvent) {
120120 : 0 ;
121121
122122 const nextSeparatorElement = separatorElements [ nextIndex ] as HTMLElement ;
123- nextSeparatorElement . focus ( ) ;
123+ nextSeparatorElement . focus ( {
124+ preventScroll : true
125+ } ) ;
124126 break ;
125127 }
126128 case "Home" : {
Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ export function onDocumentPointerDown(event: PointerEvent) {
2323 if ( ! didChangeFocus ) {
2424 didChangeFocus = true ;
2525
26- current . separator . element . focus ( ) ;
26+ current . separator . element . focus ( {
27+ preventScroll : true
28+ } ) ;
2729 }
2830 }
2931
You can’t perform that action at this time.
0 commit comments