box / box/box-ui-elements

Browser scrolls to content preview on page load

Open
#2,025 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
551
Forks
351
Avg merge
5d 9h
Merged PRs (30d)
31

Description

This occurs wherever the Content Preview UI element is used. There may be instances where this is the preferred behavior, but I think there are also cases where you wouldn't want the browser to automatically scroll to the embedded file.

## Steps to Reproduce:
1. Visit the [Content Preview Documentation](https://developer.box.com/guides/embed/ui-elements/preview/)
2. Wait a couple seconds
3. Notice how instead of starting at the top of the page, the browser scrolls to the content preview demo.

Contributor guide

Open the contributing guide

Research direction

Start with the Content Preview Documentation reproduction and identify the Content Preview UI entry point responsible for the page-load scroll. Confirm the behavior across pages that embed the preview, then ensure the documentation page remains at the top on load without breaking cases where scrolling is intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.