Disable "Close Pane" Icon in Top Right Corner of Pane

I have some carefully arranged panes and it is far too easy to accidentally click the “close” X in the upper right corner of the pane. Is there any way to disable this as a one-clickable shortcut? I’ve fine with keeping the close pane capability, I just don’t want it appearing in a place where one accidental click can mess with my layout.

Things I have tried

I’ve looked through the settings and Obsidian help, and can’t find anything related to this. The closest related article I found in the forums was this one about an “undo” shortcut upon accidentally closing a pane: https://forum.obsidian.md/t/ctrl-z-should-also-undo-close-pane/9712. What I really want is to just not have that shortcut appear at all, but a way to undo would also be helpful - doesn’t look like this other topic was resolved

What I’m trying to do


Not have this “X” icon appear at the top right corner of all my panes. It’s too easy to accidentally click.

Well, you can hide the “X” icon and close the pane with shortcut cmd+W (macOS) or Ctrl+W (for windows, I suppose).
To hide the icon you can create a css snippet with this:

.view-action.mod-close-leaf {
    display: none;

Attention: I didn’t test this and I don’t know if this css cause other conflicts. You can always delete/disable the css snippet.

Works, even with the Nord theme installed.

Didn’t even have to reload the snippet.

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