refactor(tiles): the picker's position comes from its stylesheet alone

openTilePicker set `position: fixed` inline, which .tile-picker-menu
already declares; the inline copy (carried over from the split picker,
whose menu has the same rule) is gone. The top/right offsets under the
Tiles button stay inline, since they are measured.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer
2026-10-07 09:37:04 +02:00
parent fbab0ffbf8
commit b9ce850a2c
+1 -1
View File
@@ -452,8 +452,8 @@ Object.assign(CodemanApp.prototype, {
document.body.appendChild(menu); document.body.appendChild(menu);
const btn = document.querySelector('.btn-tile-grid'); const btn = document.querySelector('.btn-tile-grid');
if (btn?.getBoundingClientRect) { if (btn?.getBoundingClientRect) {
// Under the Tiles button (.tile-picker-menu is position: fixed).
const rect = btn.getBoundingClientRect(); const rect = btn.getBoundingClientRect();
menu.style.position = 'fixed';
menu.style.top = `${rect.bottom + 4}px`; menu.style.top = `${rect.bottom + 4}px`;
menu.style.right = `${window.innerWidth - rect.right}px`; menu.style.right = `${window.innerWidth - rect.right}px`;
} }