From 21939b12ba15f4e212209f0ffb2ee10696b4f605 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 28 Nov 2020 21:46:35 +1100 Subject: [PATCH] Try not intercepting any touch events when keyboard is open --- src/Window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Window.c b/src/Window.c index 3935543f9..f74413a21 100644 --- a/src/Window.c +++ b/src/Window.c @@ -3186,7 +3186,9 @@ static EM_BOOL OnTouchMove(int type, const EmscriptenTouchEvent* ev, void* data) RescaleXY(t->targetX, t->targetY, &x, &y); Input_UpdateTouch(t->identifier, x, y); } - return true; + /* Don't intercept touchmove events while keyboard is open, that way */ + /* user can still touch to move the caret position in input textbox. */ + return !keyboardOpen; } static EM_BOOL OnTouchEnd(int type, const EmscriptenTouchEvent* ev, void* data) { @@ -3199,7 +3201,9 @@ static EM_BOOL OnTouchEnd(int type, const EmscriptenTouchEvent* ev, void* data) RescaleXY(t->targetX, t->targetY, &x, &y); Input_RemoveTouch(t->identifier, x, y); } - return true; + /* Don't intercept touchend events while keyboard is open, that way */ + /* user can still touch to move the caret position in input textbox. */ + return !keyboardOpen; } static EM_BOOL OnFocus(int type, const EmscriptenFocusEvent* ev, void* data) {