Skip to content

Commit

Permalink
refactor(core/form/inputs): make PT-input scroll to top of elements
Browse files Browse the repository at this point in the history
Where the buttons are
  • Loading branch information
skogsmaskin committed May 30, 2023
1 parent e4ea215 commit 2efe806
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ export function useTrackFocusPath(props: Props): void {
// Scroll the boundary element into view (the scrollable element itself)
scrollIntoView(boundaryElement, {
scrollMode: 'if-needed',
block: 'start',
inline: 'start',
})
// Scroll the member into view (the member within the scroll-boundary)
scrollIntoView(openItem.elementRef?.current, {
scrollIntoView(openItem.elementRef.current, {
scrollMode: 'if-needed',
boundary: boundaryElement,
block: 'start',
inline: 'start',
})
}
// If the focusPath i targeting a text block (with focusPath on the block itself),
Expand Down

0 comments on commit 2efe806

Please sign in to comment.