Bug with view mode and large list
Opened this issue · 27 comments
Hello! I found one small problem and don't know if there is a solution...
I have large lists that don't fit on the whole screen. And in these lists there are often links (these are profiles for characters). And in the reading mode, when you first hover over the link, the page scrolls sharply in a random direction. It's not in edit mode. After such scrolling (if you do not scroll again yourself), the use of the plugin is already available.
I've checked this in a lot of places, the problem is only with long lists that have links, or with a large note that has a list but no links in the list.
Sorry for the confusion and bad english..)
Hi, can you verify the following for me:
- Does this happen in the sandbox vault with the default theme, no snippets, and no plugins other than Hover Editor?
- If you can get it to happen with those conditions, please provide info on what settings you have in the Hover Editor settings page
- When you say "it's not in edit mode", do you mean the pane or tab you're hovering over, or the popup, or both?
Thanks.
I recorded a video fragment from the sandbox for you. Only your plugin is installed. The theme is standard.
In the editing mode (viewing the source code) everything is in order: I hover the mouse with ctrl and a window appears.
In the view (reading) mode, the page scrolls (watch the video). Unfortunately, I don't know if it's possible to record mouse wheel movements, but the moment I try to hover over a link, I don't touch the wheel.
bandicam.2022-12-10.21-17-32-819.mp4
The same thing happens on the standard plugin settings.
The video you posted appears blank for me - it's just 31 seconds of solid white (if viewed on Github) or solid black (if opened in its own window).
I've set the sandbox to match your settings on both Obsidian 0.15.9 and 1.1.0 and in neither am I able to get any odd scrolling behavior. Are you using Hover Editor 0.11.8? What Obsidian version? And can you attach a copy of the note(s) needed to reproduce the issue? THanks.
Strange, the video works fine for me. I can send it to you by mail or google drive.
Obsidian version 1.0.3.
Version Hover Editor 0.11.8.
Steps to complete the bug:
- Write a list larger than the displayed page.
- Add links to its points. I use "[[]]", but the same effect is achieved when using "[] ()" (for some reason the spaces didn't show up).
- Scroll down the list a little (or to the bottom of the page).
- Hover over the link in Reading View.
Attempting to hover over a link will cause the page to jump up or down. A second attempt to hover over the link (without scrolling the page) allows you to see the plugin window in its normal form.
The bug also triggers in the plugin window, if the note contains a list larger than the plugin window and links.
I can't reproduce this in Obsidian 1.1 using the directions you've given. I tried both modifying a list to have multiple links to different files and then hovering them, and making a giant list (64 lines) of links to the same file. Neither the original pane nor the hovering pane do any scrolling.
You're saying to do this in Reading View - do you mean that the mode indicator is showing a pen, or an open book?
Read mode - you can only read the file.
Edit mode - you can modify the file.
I don't use dynamic view.
In the screenshot, I show that you can create a small list, and fill the rest with text with links, and this also causes a bug. I just remove the list - the bug is no longer reproduced. You can also see that a pencil is drawn in the mode indicator.
I am also attaching a screenshot with the preview setting. If you disable ctrl for edit mode in it, the bug is not reproduced in edit mode, the window appears without problems when hovering.
However, if you put ctrl in it for reading mode, then hovering over the link does not show the window, but hovering with ctrl also pulls the page up or down.
I will also add that I reproduce this bug on another device.
You didn't say it was a numbered list, so I was using bullet lists. But I can't repro with numbered lists either. (Also, I don't know what "dynamic view" means.)
I don't really have any idea what to try next, since I can't reproduce the problem. I don't have the exact same version of Obsidian though - only 0.15.9 and 1.1.4. If the issue was introduced and fixed between those versions, then when 1.1.x is publicly released it would fix it for you. In the meantime I can try to set up a 1.0.3 install somewhere but I probably won't get to it before the weekend.
Yes, I forgot to clarify that there is a problem with both the numbered and the bulleted list.
I'm attaching a screenshot for the dynamic previewer. In English, it turns out to be called a little differently)
I don't use the "live preview". It is strange, but there is no such bug in it. There is still a bug in "reading".
Unfortunately, I don't know how to check for the bug in other versions of Obsidian. They are not available to me, I am a regular user.
If your bug does not reproduce, then I think we need to wait for a new version to be released and check again. I plan to continue using your plugin, so I will follow the updates)
Finally, an update.
Obsidian 1.1.8.
Unfortunately, the bug remains.
I still cannot reproduce this with 1.1.8 in the sandbox either. What is your installer version? Check under Settings > About, there should be "Current version v1.1.8" and "(Installer version: something)" underneath -- what is the "something"? That's the only other thing I can think of that would be different.
There is an unupdated version on another device that also reproduces the bug.
Current version: 1.0.3.
Installer version: 0.15.9.
In the new one:
Current version: 1.1.8.
Installer version: 1.0.3.
And before that it was in both versions 1.0.3.
Now updated on the second device.
Current version: 1.1.8.
Installer version: 0.15.9.
I guess I'd better reinstall Obsidian entirely?
On a device with an older version, I completely reinstalled it, but the bug remained.
Current version: 1.1.8.
Installer version: 1.1.8.
I just tried to reproduce the bug in the sandbox in the list, which I did not write myself there, but already in the existing one. Did not work out.
There was a list in the middle of the note. That is, first just text, then a list, then text again.
Wrote something similar in my note and it kind of helped. The page barely trembles towards the end of the note, but it's not noticeable at all.
If you can paste into this issue the exact text of the notes involved (each in a triple-backquote code block), I can see if I can repro it with the exact text.
OK. Here is an example:
1. ffh
2. [[eh]]
3. dh
4. [[eh]]
5. eh
6. eh
7. [[eth]]
8. e
9. [[the]]
10. th
11. ee
12. [[et]]
13. et
14. heh
15. [[eheth]]
ethethetheth
eth
[[eh]]
eh
[[eh]]
et
he
th
[[4h]]
4jr
j
[[rje]]
h
ee
h
[[eh]]
[[ryj]]
k
te
And a version with less jerkiness:
[[dgjgdjJDGJDJ]]
j
d
[[jd]]
gj
[[dgj]]
yj
yr
1. ffh
2. [[eh]]
3. dh
4. [[eh]]
5. eh
6. eh
7. [[eth]]
8. e
9. [[the]]
10. th
11. ee
12. [[et]]
13. et
14. heh
15. [[eheth]]
ethethetheth
eth
[[eh]]
eh
[[eh]]
et
he
th
[[4h]]
4jr
j
[[rje]]
h
ee
h
[[eh]]
[[ryj]]
k
te
I am creating a new note called eh
in the sandbox vault, putting it to reading mode with the settings you showed previously and the first content block from your most recent comment, and then scrolling to different parts of it, ctrl-hovering the "eh" links, and neither the origin pane nor the popup are scrolling in any way.
The only thing I can think of to try at this point would be for you to make a new vault containing just enough to reproduce the problem, then zip up a copy of the vault and attach it here so I can try with the problem vault.
I don't use ctrl while hovering. It is not needed in read mode by default.
I also reproduced the bug in different repositories (personal and in the sandbox) and on different devices.
This is why attaching a copy of a new vault that reproduces the problem is needed -- there are obviously way too many things that could be causing the problem that don't necessarily match between your setup and mine. But a vault contains all of its settings, so in principle I should be able to reproduce it then.
I created a new repository with only a couple of custom settings that differ from the default ones, and with your plugin. The bug still persists. I am attaching an archive.
test.zip
Ok, the good news is that I am now able to reproduce the behavior that if you hover with a partially-visible ordered list (from your test list 2 file) in reading mode, the reading mode pane scrolls up a few lines, .
The bad news is that this is an issue internal to Obsidian and happens even without Hover Editor: you will see the exact same scroll happen if you resize the window or pane, or do any other workspace layout change -- even just switching tabs. (And creating a hover editor popup is also a workspace layout change, so it triggers the issue.)
So, there isn't actually anything we can do to fix this in Hover Editor - the code that resets the scroll position is somewhere deep in Obsidian's proprietary markdown rendering component.
Wow...
Glad you finally figured out where this came from. Although without your plugin I can’t reproduce the bug, but it sounds quite logical)
I hope this will be fixed in the future)
Just to confirm: the behavior you're experiencing is that the scroll position jerks upward by a few lines in the document, correct? That is the only thing I could get to happen, and it also happens if you resize the window, or switch to a different tab in the same pane and then come back. (Even if Hover Editor is disabled.)
Yes, it scrolls up a few lines, but the amount probably depends on the size of the list. In a small list for half a line or two or three, and in a huge one (when the items do not fit into one line) it can jump ten lines.
If I resize the window or switch to another tab, then this behavior is preserved in all files with lists. It doesn't work without any list.
With the plugin disabled, unfortunately, this scrolling behavior doesn't recur for me. I just turn off the Hover Editor and everything works stably, without scrolling when hovering over links.
Right, my point was that the issue is related to workspace layout changes and happens with or without Hover Editor enabled -- so not something we can fix. You would need to file a bug report on the Obsidian forums with the info on how to reproduce it without Hover Editor present.
The reason that the built-in page preview does not cause this is because it only displays a popup, not a full-featured editor window. In effect, Hover Editor is creating an entire new tab whenever you open it, which causes a workspace layout change (by definition), so we cannot stop the underlying Obsidian issue from being triggered.
Hi, just to chime in on this: firstly I'm happy to see I'm no the only one!
And as this happens also for links in dataview blocks, indeed it seems the issue is not with Hover Editor, but how Obsidian manages focus of workspace elements.
Also hoping this will be resolved!
@ThunderWeed Did you end up filing a bug report on the Obsidian forum? Otherwise I will!