mirror of
https://gitcode.com/JianFeeeee/ModelRouter.git
synced 2026-09-20 00:48:00 +00:00
fix: right-click ctx menu never closes — showCtx appended the menu but never stored it in ctxEl, so hideCtx (item click / outside press) was always a no-op; priority page and keys page affected
This commit is contained in:
@ -2020,6 +2020,7 @@ function showCtx(x, y, items) {
|
||||
const it = items[+t.dataset.i]; hideCtx(); if (it) it.fn();
|
||||
});
|
||||
document.body.appendChild(w);
|
||||
ctxEl = w;
|
||||
const r = w.getBoundingClientRect();
|
||||
w.style.left = Math.max(6, Math.min(x, window.innerWidth - r.width - 6)) + 'px';
|
||||
w.style.top = Math.max(6, Math.min(y, window.innerHeight - r.height - 6)) + 'px';
|
||||
|
||||
Reference in New Issue
Block a user