diff options
| author | RblSb <msrblsb@gmail.com> | 2020-05-23 22:33:44 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-05-23 22:33:44 +0300 |
| commit | 5b94c5cc110f9367b844a622aa0ef4aabef34750 (patch) | |
| tree | 495d14c2041959fe859957fb9ab96d80fffa03be /res/client.js | |
| parent | 45080aa1f6d80f2ef64983904acbe1645c312d25 (diff) | |
Scroll to chat end on input touch
Diffstat (limited to 'res/client.js')
| -rw-r--r-- | res/client.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/res/client.js b/res/client.js index 318971b..0d19189 100644 --- a/res/client.js +++ b/res/client.js @@ -726,7 +726,13 @@ client_Buttons.initChatInput = function(main) { guestPass.value = ""; } }; - new client_InputWithHistory(window.document.querySelector("#chatline"),null,50,function(value) { + var chatline = window.document.querySelector("#chatline"); + chatline.onfocus = function(e) { + if(client_Utils.isTouch()) { + main.scrollChatToEnd(); + } + }; + new client_InputWithHistory(chatline,null,50,function(value) { main.send({ type : "Message", message : { clientName : "", text : value}}); return true; }); |
