Open and Contents tabs and more open tiddler but does not scroll to open tiddler

I have a wiki that is important to me that seems to have spontaneously stopped scrolling to an open tiddler in the story. Such as from the Open, Contents, recent tabs and more.

  • When selecting a tiddler from a tag pill, it does open that tiddler below but will not “navigate to it”.

I have searched in many places to see what may be causing this, any ideas?

1 Like

I recall I had that problem with a project where I had Krystal installed… the navigation worked only when I had horizontal layout active. When I tried to switch back to default layout (with the Krystal plugin still installed), I ended up with failure to navigate to tiddlers opened/clicked via the sidebar (and also via other internal links too).

Alas, I didn’t do a deep dive to solve the problem; I gave up and removed the Krystal plugin after I was done with my in-person horizontal-scrolling presentation event.

Can I assume that you’ve done the bit where you disable all plugins, and, assuming the wiki then works properly, enable them one-by-one until the problem comes back?

Thanks for the suggestion @Scott_Sauyet I had not because I suspected there was a message catcher somewhere.

  • Disabling and reloading most plugins with no improvement
  • Checked core plugin tiddlers for overwrite none
  • More to check,

I had hoped there was a known problem giving rise to open but not navigate.

This isn’t an exceedingly helpful data point, but I noticed the same failure to navigate when I was helping @arunnbabu81 with their wiki the other day. It isn’t using Krystal (at present, anyway.)

Of course, when I went to get that link, I noticed that it is working again, though the theme is somewhat different. Maybe @arunnbabu81 can remember what they changed that might have fixed it?

I don’t know what exactly changed.
The first wiki which @etardiff had trouble navigating was created some time back. I changed it and uploaded a recent version in that tiddlyhost site yesterday. So I don’t know what exactly changed.

I remember adding some custom layouts created by Saq (single tiddler layout) and one by btheado previously for experimentation. And when I reverted back to default layout, there was some navigation issues. At that time, if I remember correctly I had to delete some remnant tiddlers of those custom layout to solve the navigation issues. Since all these happened some time back, I don’t remember correctly what was the issue exactly.

The wiki which @etardiff saw initially might be one of those affected wikis.

I just download an empty.html, then imported all tiddlers from the broken wiki, the problem returned before reloading for plugins to take effect.

  • I also upgraded the original no change
  • ctrl-home and ctrl-end would normally jump to the top and bottom of the story but do not, I wonder if this is a clue?

Solution;

  • I was looking through the stylesheets, bottom up and saw one called $:/PSaT/left-right-scrollbars which was not working in the past; removing the $:/tags/Stylesheet tag fixed it;

So this CSS breaks tiddlywiki

@media (min-width: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}} ) {
.tc-page-container { height:100vh; overflow:hidden; }
.tc-story-river    { height:100vh; overflow:auto; overflow:overlay; }
.tc-story-river    { direction:rtl; } .tc-story-river > * { direction:ltr; }
}

I got this from [ TopBar ] - how does your ideal top bar look like? - #5 by EricShulman but I take full responsibility.

FYI: @EricShulman

Thanks all for your help

Sorry I didn’t respond sooner, but I have been somewhat distracted for the past few weeks due to a death in my family (my Father passed on March 15, at the ripe old age of 95), and I must have missed this discussion.

The scrolling problem is indeed a side-effect of my “topbar” CSS.

It’s actually quite a subtle problem that originates with how the TWCore invokes the “scrollIntoView()” javascript function.

By default, the TWCore assumes that the element that needs to scroll when the Story River “overflows” is the document.body, which is a valid assumption only if the .tc-page-container element (which contains the .tc-story-river element) grows taller than the current window height.

But my “topbar” CSS changes this by limiting the .tc-page-container and .tc-story-river heights to 100vh, and then setting the .tc-story-river to overflow:auto; overflow:overlay;. As a result, it is the Story River element itself which needs to be the target of the scrollIntoView() javascript call, rather than the document.body element that the TWCore assumes.

Fortunately, I’ve already worked out an easy fix. Install these two tiddlers:
TiddlyTools/Templates/ScrollHere and TiddlyTools/Widgets/scrollhere.js

  • TiddlyTools/Templates/ScrollHere adds the following line to the end of each tiddler rendered in the Story River:
    <$list filter="[{$:/HistoryList!!current-tiddler}match<currentTiddler>]"><$scrollhere/></$list>

  • TiddlyTools/Widgets/scrollhere.js defines the $scrollhere widget, which invokes the scrollIntoViewIfNeeded() or scrollIntoView() javascript function on the current tiddler’s parent container (which is the .tc-story-river). The result is that when navigating to a tiddler (which updates the $:/HistoryList!!current-tiddler), the tiddler is once again properly scrolled into view within the Story River.

enjoy,
-e

2 Likes

Mt condolences @EricShulman I only mentioned you 4 hours ago, don’t stress.

Thank you