Skip to content

[FR] Inject cMenuModalBar in .mod-vertical.mod-root instead of body child. #3

@Write

Description

@Write

Hi, I just discovered the plugin and love the idea,

I noticed the plugin's bar doesn't self adjust to side panels (open/closed and their size)
I tried on my side to change (https://github.com/chetachiezikeuzor/cMenu-Plugin/blob/master/main.ts#L73)
document.body.appendChild(cMenuModalBar);
to
document.body.querySelector(".mod-root .view-content").appendChild(cMenuModalBar);
and it work like a charm (for me, at least), the bar will always stay centered in the .view-content, where the "writing content" actually is.

PS : I'm not sure about Obsidian's rules as to what are bests practices so maybe what I propose isn't recommended at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions