mirror of
https://github.com/multipleof4/sune.git
synced 2026-09-18 03:25:44 +00:00
This build was committed by a bot.
This commit is contained in:
@@ -646,6 +646,11 @@ function kbUpdate() {
|
||||
el.chat.style.scrollPaddingBottom = fh + overlap + 16 + "px";
|
||||
}
|
||||
function kbBind() {
|
||||
el.input.addEventListener("keydown", (e) => {
|
||||
if (e.key !== "Enter" || e.shiftKey || e.isComposing || e.keyCode === 229 || e.repeat || !matchMedia("(hover: hover) and (pointer: fine)").matches) return;
|
||||
e.preventDefault();
|
||||
el.composer.requestSubmit();
|
||||
});
|
||||
if (window.visualViewport) ["resize", "scroll"].forEach((ev) => window.visualViewport.addEventListener(ev, () => kbUpdate(), { passive: true }));
|
||||
window.$(window).on("resize orientationchange", () => setTimeout(kbUpdate, 50));
|
||||
window.$(el.input).on("focus click", () => {
|
||||
Reference in New Issue
Block a user