+Dynamic textarea sizing

This commit is contained in:
Simon Martens
2026-01-09 11:20:16 +01:00
parent a08a7e5710
commit 69d8ec71b3
7 changed files with 484 additions and 298 deletions

View File

@@ -245,6 +245,19 @@ export class DivManager extends HTMLElement {
this.renderMenu();
this.renderButton();
this.updateTargetVisibility();
// Resize any textareas in the newly shown element
if (typeof window.TextareaAutoResize === "function") {
const textareas = child.node.querySelectorAll("textarea");
if (textareas.length > 0) {
// Small delay to ensure element is visible before measuring
setTimeout(() => {
textareas.forEach((textarea) => {
window.TextareaAutoResize(textarea);
});
}, 10);
}
}
}
renderMenu() {