Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

[Frontend] Fix faketouch capturing touches on UI. #410

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Frontend/library/src/Inputs/FakeTouchController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class FakeTouchController implements ITouchController {
* @param touch - the activating touch event
*/
onTouchStart(touch: TouchEvent): void {
if (!this.videoElementProvider.isVideoReady()) {
if (!this.videoElementProvider.isVideoReady() || touch.target !== this.videoElementProvider.getVideoElement()) {
return;
}
if (this.fakeTouchFinger == null) {
Expand Down Expand Up @@ -108,7 +108,7 @@ export class FakeTouchController implements ITouchController {
* @param touchEvent - the activating touch event
*/
onTouchEnd(touchEvent: TouchEvent): void {
if (!this.videoElementProvider.isVideoReady()) {
if (!this.videoElementProvider.isVideoReady() || this.fakeTouchFinger == null) {
return;
}
const videoElementParent =
Expand Down Expand Up @@ -144,7 +144,7 @@ export class FakeTouchController implements ITouchController {
* @param touchEvent - the activating touch event
*/
onTouchMove(touchEvent: TouchEvent): void {
if (!this.videoElementProvider.isVideoReady()) {
if (!this.videoElementProvider.isVideoReady() || this.fakeTouchFinger == null) {
return;
}
const toStreamerHandlers =
Expand Down