aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Buttons.hx10
-rw-r--r--src/client/Main.hx2
2 files changed, 8 insertions, 4 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 625a71f..7e9c8cb 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -297,18 +297,22 @@ class Buttons {
static function initChatInput(main:Main):Void {
final guestName:InputElement = cast ge("#guestname");
guestName.onkeydown = e -> {
- if (e.keyCode == 13) main.guestLogin(guestName.value);
+ if (e.keyCode == KeyCode.Return) main.guestLogin(guestName.value);
}
final guestPass:InputElement = cast ge("#guestpass");
guestPass.onkeydown = e -> {
- if (e.keyCode == 13) {
+ if (e.keyCode == KeyCode.Return) {
main.userLogin(guestName.value, guestPass.value);
guestPass.value = "";
}
}
- new InputWithHistory(cast ge("#chatline"), 50, value -> {
+ final chatline:InputElement = cast ge("#chatline");
+ chatline.onfocus = e -> {
+ if (Utils.isTouch()) main.scrollChatToEnd();
+ }
+ new InputWithHistory(chatline, 50, value -> {
main.send({
type: Message,
message: {
diff --git a/src/client/Main.hx b/src/client/Main.hx
index 7e3a3be..527b898 100644
--- a/src/client/Main.hx
+++ b/src/client/Main.hx
@@ -156,7 +156,7 @@ class Main {
ge("#ce_queue_next").onclick = e -> addIframe(false);
ge("#ce_queue_end").onclick = e -> addIframe(true);
ge("#customembed-title").onkeydown = (e:KeyboardEvent) -> {
- if (e.keyCode == 13) {
+ if (e.keyCode == KeyCode.Return) {
addIframe(true);
e.preventDefault();
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage