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

Fix: disable the storyview scroll in the "Open" tab #8696

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

BurningTreeC
Copy link
Contributor

This PR adds a variable tv-disable-storyview-scroll that, if set, disables the scrolling to the target element.
This is useful in the sidebar's "Open" tab for example, where under certain circumstances it can cause the sidebar to scroll when opening a new tiddler or the control panel

Copy link

Confirmed: BurningTreeC has already signed the Contributor License Agreement (see contributing.md)

@BurningTreeC
Copy link
Contributor Author

BurningTreeC commented Oct 20, 2024

to reproduce:

  • go to tiddlywiki.com
  • change the sidebarlayout to fixed-fluid
  • close the ControlPanel
  • open the dev tools
  • go to the Inspector
  • add the attribute dir="rtl" to the html element
  • open the "Open" sidebar tab
  • open the ControlPanel again or a New Tiddler
  • see how the sidebar scrolls

to compare, here's a build with this PR:
https://tv-disable-storyview-scroll.tiddlyhost.com/

@BurningTreeC
Copy link
Contributor Author

This fixes also the behavior of scrollIntoView in Chromium browsers (should we use scrollIntoView in the future for the pageScroller) - where a scrollIntoView stops the previous scrollIntoView ... so if we scrolled the ControlPanel into view and had the sidebar's "Open" tab open, the story-river wouldn't scroll to the ControlPanel (or just a bit)

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.

1 participant