When using a query block, searching on the current page will cause incorrect rendering

Steps to reproduce

When using a query block, searching on the current page will cause incorrect rendering

Actual result

  1. Insert Query: key into the document

         ```query
         code
         ```
    
  2. Insert multiple keys into the document at random and search(find all),it’s ok.

  3. Switch views again, and search again, and you have a bug

  1. At this point, even if you switch back to viewing the view, the error will not disappear

Summary: When searching for the first time, the content of the query code block will be searched, but when switching views and searching again, the rendered text of the query code block will be searched, and the search for the rendered text will hit the box beyond the content, resulting in an overall rendering error

Additional information

动画

You deleted parts of the bug report template that are needed to evaluate this (they help eliminate extra factors like plugins as possible causes). Please copy the template from a new post and add the missing information. I’m moving this to Help for now.

Did you follow the troubleshooting guide? [Y/N]

Y

  • We only consider bugs that are reproducible in the sandbox vault or a vault with no third-party plugins/no css snippets/default theme.

Environment

  • win11
  • obsidian v1.6.5
  • in the Sandbox

“Environment” should be the pasted results of Obsidian’s “Show debug info” command. (Moving back to bug reports for now anyway.)

I understand. Previously, I couldn’t find the corresponding ‘Show debug info’ command in the Chinese environment. Sorry.

SYSTEM INFO:
	Obsidian version: v1.6.5
	Installer version: v1.4.16
	Operating system: Windows 10 Pro 10.0.22621
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none
1 Like