OnClick on search result: Scroll to matched text also in Preview mode

Now it works correctly only in edit-mode.

Current behavior:

  • before click:
    image

  • after click:
    image

In preview mode Click on search result scrolls to inappropriate place. The matched text initially on screen scrolls out of view even when screen is high enough to accommodate whole list, when there is enough content under the list.

Details:
Matched text is in text of markdown link.
The link in one list item, starting by hyphen.
Temporary highlighting is applied to whole list, not only to the relevant list item (bullet point), neither just to the matched text (like in edit mode).

Initially formulated as a bug: Inconsistent scroll on search click

Similar functionality has been implemented for local search: Search in preview does not autojump to first match (like edit does)

1 Like