Cssclasses is not cleared for edit mode

Steps to reproduce

Add the following css snippet file

.red-box-page {
  border: 1px solid red;

Add two notes:

Page 1.md:

  - red-box-page
[[Page 2]] does not set the cssclasses, but when open it from Page 1, the css classes preserve in the edit mode.

Page 2.md is empty.

Open Page 1.md in edit mode (with live preview), and go to Page 2.md by clicking the link.

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

Yes, here is the example vault:
Experimental.zip (4.6 KB)

Expected result

The red box only shows in Page 1.md, but not in Page 2.md.

Actual result

The red box shows in both Page 1.md and Page 2.md. But it disapears in Page 2.md when switching to read mode.


Obsidian version: v1.5.8
Installer version: v1.5.8
Operating system: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:31 PST 2024; root:xnu-10063.101.15~2/RELEASE_X86_64 23.4.0
Login status: logged in
Catalyst license: insider
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 1
Restricted mode: on

Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.

Additional information

If I read the Changelog correctly then this has been dealt with in the latest Catalyst version and will be part of the next public release:

  • Fixed issue where cssclasses would sometimes stay applied to the tab when switching to another file.

Confirmed that it has been fixed in 1.5.11

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