submit additional_text when pressing enter. see #525 fixes #654

This commit is contained in:
mic 2026-02-12 22:46:50 +01:00
parent d00e242509
commit 12206f0557

View file

@ -238,7 +238,12 @@ class MessageInput extends HTMLElement {
this._customBtn = shadowRoot.querySelector('#mzta-custom_btn');
this._customStep = shadowRoot.querySelector('#mzta-custom_step');
this._customBtn.addEventListener("click", () => { this._customTextBtnClick({customBtn:this._customBtn,customLoading:this._customLoading,customDiv:this._customText}) });
this._customTextArea.addEventListener("keydown", (event) => { if(event.code == "Enter" && event.ctrlKey) this._customTextBtnClick({customBtn:this._customBtn,customLoading:this._customLoading,customDiv:this._customText}) });
this._customTextArea.addEventListener("keydown", (event) => {
if (event.key === "Enter" && !event.shiftKey) {
event.preventDefault();
this._customTextBtnClick({customBtn:this._customBtn,customLoading:this._customLoading,customDiv:this._customText});
}
});
}
connectedCallback() {