mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-19 19:25:27 -04:00
fix(ui): share one z-order stack across Notes and modals (#3798)
* fix(notes): bring pane above active windows * fix(notes): align tool window z-order handoff --------- Co-authored-by: Matyas Fenyves <16389204+uhhgoat@users.noreply.github.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
import { previewZoneAt, clearPreview, snapModalToZone } from './tileManager.js';
|
||||
import { suspendDock, resumeDock, clearRightDock, applyEdgeDock } from './modalSnap.js';
|
||||
import { dismissOrRemove } from './escMenuStack.js';
|
||||
import { nextToolWindowZ } from './toolWindowZOrder.js';
|
||||
|
||||
const _state = new Map(); // id -> { restoreFn, closeFn, railBtnId, isMinimized, restoreMinHeight }
|
||||
|
||||
@@ -63,7 +64,14 @@ function _applyRememberedDock(id) {
|
||||
// those statics and bump on every bring-to-front.
|
||||
let _modalTopZ = 300;
|
||||
function _bringToFront(modal) {
|
||||
if (modal) modal.style.setProperty('z-index', String(++_modalTopZ), 'important');
|
||||
if (!modal) return;
|
||||
const z = nextToolWindowZ({
|
||||
exclude: modal,
|
||||
current: getComputedStyle(modal).zIndex,
|
||||
floor: _modalTopZ,
|
||||
});
|
||||
_modalTopZ = Math.max(_modalTopZ, z);
|
||||
modal.style.setProperty('z-index', String(z), 'important');
|
||||
}
|
||||
|
||||
function _emitModalOpened(id, modal) {
|
||||
|
||||
Reference in New Issue
Block a user