Skip to content

Commit

Permalink
Improve scrollIntoView behavior #437
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Jun 20, 2024
1 parent f6f2c04 commit 7dcbc9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Client/Pages/BuildingBlock/SearchComponent.fs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ let private scrollIntoViewRetry (id: string) =
()
else
let rect = headerelement.getBoundingClientRect()
if rect.left >= 0 then
if rect.left >= 0 && ((rect.right <= Browser.Dom.window.innerWidth) || (rect.right <= Browser.Dom.document.documentElement.clientWidth)) then
()
else
let config = createEmpty<Browser.Types.ScrollIntoViewOptions>
Expand Down

0 comments on commit 7dcbc9a

Please sign in to comment.