From 79770e59d3d83e8c3840f372b429e82753175e49 Mon Sep 17 00:00:00 2001 From: bdeshi Date: Sun, 19 Jul 2026 23:01:04 +0600 Subject: [PATCH] fall back to a dom query in case ribbonItemsEl moves --- main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 146d813..4b6a7e0 100644 --- a/main.js +++ b/main.js @@ -35,10 +35,14 @@ module.exports = class RibbonOrderLock extends Plugin { return this.app.workspace.leftRibbon ?? null; } + getRibbonContainerEl(ribbon) { + return ribbon.ribbonItemsEl ?? document.querySelector('.side-dock-ribbon.mod-left .side-dock-actions'); + } + observeRibbon() { const ribbon = this.getRibbon(); if (!ribbon) return; - const containerEl = ribbon.ribbonItemsEl; + const containerEl = this.getRibbonContainerEl(ribbon); if (!containerEl) return; this.observer = new MutationObserver(() => this.debouncedEnforce());