Avoid double-counting prompt editor height
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-15 09:29:48 +00:00
parent fee851698d
commit d19d120fc3
-3
View File
@@ -262,9 +262,6 @@ function configure(node) {
// Measure the actual DOM panel instead of guessing from slot count.
const panelHeight = Math.ceil(panel.getBoundingClientRect().height || panel.scrollHeight || 0);
display.computeSize = (width) => [Math.max(420, Number(width) || 420), panelHeight + 2];
const fittedWidth = Math.max(420, Number(node.size?.[0]) || 420);
const fittedHeight = Number(node.computeSize?.()[1]) || panelHeight + 180;
node.setSize?.([fittedWidth, fittedHeight]);
};
const refresh = () => { state = readState(stateWidget, Number(countWidget.value) || 2, Number(secondsWidget.value) || 4); render(); setState(); };
countWidget.callback = ((previous) => function(...args) { const result = previous?.apply(this, args); refresh(); return result; })(countWidget.callback);