Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Fixed bouncy view in sidebar caused by scrollIntoView() #28485

Merged
merged 2 commits into from
May 27, 2024

Conversation

ycw
Copy link
Contributor

@ycw ycw commented May 24, 2024

The issue: Currently when users selected an object in a long outliner(or simply add objects), the sidebar will be scrolled way up to show active property tab (e.g. SCRIPT) into view, this causes a bouncy view. The expected behavior should be scrolling the active property tabs inside the tabsDiv container only:

bouncy.issue.when.using.scrollIntoView.mp4

This PR fixed that issue, by using scrollTo(), instead of scrollIntoView().

no.bouncy.issue.when.using.scrollTo.mp4

Preview: https://raw.githack.com/ycw/three.js/editor-uitabbedpanel-no-scrollintoview/editor/index.html

Details:

  • 'Scrolls to tab' performs right after panel is displayed
  • 'Scrolls to tab' honors bidirectional in order to match the original scrollIntoView behavior:
bidir.auto.scrollto.mp4

@Mugen87 Mugen87 added this to the r165 milestone May 24, 2024
@ycw ycw force-pushed the editor-uitabbedpanel-no-scrollintoview branch from 5f20b71 to d9a0598 Compare May 24, 2024 10:51
@ycw ycw marked this pull request as draft May 24, 2024 11:42
@ycw ycw marked this pull request as ready for review May 24, 2024 11:44
@ycw ycw requested a review from Mugen87 May 24, 2024 11:45
@ycw ycw marked this pull request as draft May 26, 2024 11:22
@ycw ycw marked this pull request as ready for review May 26, 2024 11:23
@mrdoob mrdoob merged commit f75fb41 into mrdoob:dev May 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants