Try not intercepting any touch events when keyboard is open

This commit is contained in:
UnknownShadow200 2020-11-28 21:46:35 +11:00
parent 9de0b309fd
commit 21939b12ba

View File

@ -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) {