+BIGFIX: order buttons, collapse inhalte list

This commit is contained in:
Simon Martens
2026-01-16 18:15:59 +01:00
parent 8c96aaa88b
commit 136cb5f757
9 changed files with 201 additions and 42 deletions

View File

@@ -7655,6 +7655,9 @@ ${e[0].nameText()} hinzufügen`, this._menu = null, this.hideMenu();
});
}, 10);
}
requestAnimationFrame(() => {
this._focusFirstField(n.node);
});
}
renderMenu() {
const e = this._cildren.filter((n) => n.hidden());
@@ -7706,6 +7709,22 @@ ${e[0].nameText()} hinzufügen`, this._menu = null, this.hideMenu();
typeof ((n = i.editor) == null ? void 0 : n.loadHTML) == "function" && i.editor.loadHTML("");
}));
}
_focusFirstField(e) {
if (!e)
return;
const i = e.querySelectorAll(
"input:not([type='hidden']):not([disabled]), textarea:not([disabled]), select:not([disabled]), [contenteditable='true'], trix-editor"
);
for (const n of i)
if (n instanceof HTMLElement && n.getClientRects().length !== 0) {
try {
n.focus({ preventScroll: !0 });
} catch {
n.focus();
}
return;
}
}
}
ii = new WeakSet(), po = function() {
this._cildren = [], this._rendered = [], this._target = null, this._button = null, this._menu = null, this._originalButtonText = null;