Location of the preview panel jumps back to the beginning of the page

This case is different from the fixed one here: Location of the preview panel jumps back to the beginning of the page when there is an embedded block - #4 by WhiteNoise

Steps to reproduce

  1. Turn on “Fold indent” in Settings->Editor panel
  2. Creating a note as the following:
## Para_title_1

## Para_title_2

## Para_title_3

## Para_title_4

## Para_title_6

## Para_title_7

## Para_title_8

## Para_title_9

- This is a list with children
	- a
	- b
	- c
	- d
	- e
	- f

## Para_title_10

## Para_title_11

## Para_title_12

## Para_title_13

## Para_title_14

## Para_title_15

## Para_title_16

## Para_title_17

## Para_title_18

## Para_title_19

## Para_title_20

## Para_title_21

## Para_title_22

## Para_title_23

## Para_title_24
  1. split the window vertically, link the two windows and turn one of the window to edit mode and the other preview mode
  2. in the preview window, fold the list.
  3. scroll down the window in edit mode

Expected result

the content within the preview mode windows should scroll down to the correct location accordingly.

Actual result

When it comes to the unfold list in the window in edit mode, the preview page jumps back to the beginning of the page.

Environment

  • Operating system: MacOS
  • Obsidian version: 0.11.5

Additional information

Case#2-1: with the list folded in window in editing mode
Mar-09-2021 13-00-19

Case#2-2: with the list unfold in window in editing mode
Mar-09-2021 13-00-33

3 Likes

I’ve got a related or perhaps identical issue: Internal note link to heading / block reference jumps back to top of page

I have narrow down the case.


(a lot of words)

- aaaa
 - aaaaa

(one page of empty new line)

and then you can reproduce this bug while scroll over “aaaa” with some themes like “Obsidiante”, “Cybertron” , “pisum”. BTW, default theme wont behave as described.

@davecan has a good write-up of what feels almost certainly the same issue here → Triggering preview mode in long docs causes preview to scroll to top of document in certain cases

Let me know if you still have this issue with version 0.13

I’m using 0.13.2, now the issue has gone.

Moreover, I also notice a css setting which may relate to the issue.

With Obsidian 0.13.2, the aforesaid issue has gone.
So I decided to changed the examples above slightly, to test the behavior of the task list.

## Para_title_4

## Para_title_6

## Para_title_7

## Para_title_8

## Para_title_9

- This is a list with children
	- a
	- b
	- c
	- d
	- e
	- f

- [ ] This is a task list with children
	- a
	- b
	- c
	- d
	- e
	- f

## Para_title_10

## Para_title_11

## Para_title_12

## Para_title_13

## Para_title_14

## Para_title_15

## Para_title_16

## Para_title_17

## Para_title_18

## Para_title_19

## Para_title_20

## Para_title_21

## Para_title_22

## Para_title_23

## Para_title_24

With Default theme, everything is ok. I mean, the issue has gone. However, when I turned on the 3rd party theme, in my case it is "Blue Topaz”, I found the issue comes back:

Nov-16-2021 14-09-59

Fortunately, with a wild guess, I located the cause within the .css of the 3rd party theme by accident:

 ul.contains-task-list ul,
 ol.contains-task-list ul,
 ul.contains-task-list ol,
 ol.contains-task-list ol {
   position: relative;
 }

Removing the ‘position: relative;’ part solves the problem. But I guess it is not best manner. So, I made a snippet:

 ul.contains-task-list ul,
 ol.contains-task-list ul,
 ul.contains-task-list ol,
 ol.contains-task-list ol {
   position: initial;
 }

Nov-16-2021 14-21-49

I want to emphasize that the Obsidian 0.13.2 has solved the problem. The above css snippet is to provide a patch for the 3rd party theme, such as “Blue Topaz”, to not affect obsidian solving this problem.

Hope this piece of information helpful for those who encounter the similar problem.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.