Skip to content

Problem with a touch event on mobile device #5667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 17 tasks
Michal8705 opened this issue Apr 29, 2022 · 6 comments
Open
1 of 17 tasks

Problem with a touch event on mobile device #5667

Michal8705 opened this issue Apr 29, 2022 · 6 comments

Comments

@Michal8705
Copy link

Most appropriate sub-area of p5.js?

  • Accessibility (Web Accessibility)
  • Build tools and processes
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Friendly error system
  • Image
  • IO (Input/Output)
  • Localization
  • Math
  • Unit Testing
  • Typography
  • Utilities
  • WebGL
  • Other (specify if possible)

p5.js version

1.4.0

Web browser and version

Chrome 101.0.4951.44

Operating System

iOS 14.7.1

Steps to reproduce this

Steps:

  1. Open https://editor.p5js.org/Michal8705/full/PaTRVm7UP on Chrome
  2. When I roll up the top bar with a quick movement (screen1), then in the text field is all the time false and touching event did not work (screen2). In iOS without this action all the time text information is 'false'

Does anyone know how to solve this problem or maybe a fix in p5 is needed?

My code below
https://editor.p5js.org/Michal8705/sketches/PaTRVm7UP

screen1
screen2

@Michal8705 Michal8705 added the Bug label Apr 29, 2022
@limzykenneth
Copy link
Member

Hi @Michal8705, by Chrome do you mean Chrome on desktop or Chome on iOS? Conversely by iOS do you mean in Safari or just in general? Does this happen only in the web editor or can it be replicated if you are not using the web editor?

@Michal8705
Copy link
Author

Hi, sorry for the late reply, but I'm on vacation. The error occurred on Chrome on iPhone 7 with iOS. I checked on Xiaomi with Android and the error didn't appear. Interestingly, the error didn't appear when I transferred the code to Github Pages. There, it works fine on every device. So the first conclusion is that the problem is with the web editor. However, I will try to do more tests.

@TsarPrince
Copy link

TsarPrince commented Dec 27, 2022

Hello, seems like a valid problem. I would like to work on this. Shall I go ahead?

@limzykenneth
Copy link
Member

@TsarPrince It would help if you can try and isolate the problem as mentioned first. We need to know under what conditions does this problem occur before we can suggest a fix.

@TsarPrince
Copy link

TsarPrince commented Dec 29, 2022

@limzykenneth I tested the above link mentioned by @Michal8705 both on Safari and Chrome on iPhone 12. The link has changed a little but the underlying problem is still same - seems like mouseX is not working on iPhone platform. Also, it works as intended in android (tested on Google Pixel 4A and Samsung Tab A7).

@TsarPrince
Copy link

Seems like this is an "expected" behaviour of iOS, this problem was also faced by React which I found here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants