fix: A2UI now behaves better

This commit is contained in:
hugo committed 2026-05-01 23:15:04 +02:00
1 parent 64a5eb525d
commit c495a2ed0a
7 files changed
+163 -12

No files matched your search

+2
View File
@@ -5620,6 +5620,8 @@ button svg * {
}
.chat-inline-surface {
width: 100%;
margin: 12px 0 0;
overflow: hidden;
}
+6
View File
@@ -788,6 +788,10 @@ document.addEventListener("DOMContentLoaded", () => {
});
};
this.surfaceObserver = new MutationObserver(() => {
this.syncExpandedSurfaces();
});
this.handleScroll = () => {
if (!this.scrollContainer) {
this.stickToBottom = true;
@@ -832,6 +836,7 @@ document.addEventListener("DOMContentLoaded", () => {
this.syncScrollContainer();
this.syncExpandedSurfaces();
this.surfaceObserver.observe(this.el, { childList: true, subtree: true });
this.autoResize();
window.requestAnimationFrame(() => this.scrollToBottom(true));
},
@@ -844,6 +849,7 @@ document.addEventListener("DOMContentLoaded", () => {
},
destroyed() {
this.surfaceObserver.disconnect();
this.el.removeEventListener("input", this.handleInput);
this.el.removeEventListener("keydown", this.handleKeyDown);