Skip to content
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

autoPreventDefault not working. still can not touch scroll. #4824

Closed
rockmandash opened this issue Apr 2, 2018 · 4 comments
Closed

autoPreventDefault not working. still can not touch scroll. #4824

rockmandash opened this issue Apr 2, 2018 · 4 comments

Comments

@rockmandash
Copy link

Hello, first of all, thanks for the wonderful library.
Pixi is amazing, I can't wait for v5 coming out!
Now, I have encountered a problem.
I can not scroll my canvas using the mobile scroll.
I'm using ^4.7.1 version

Here is my code

    this.App = new Application(
      Math.min(window.innerWidth, window.screen.width),
      Math.min(window.innerHeight, window.screen.height),
      {
        backgroundColor: `0x${backgroundColor}`,
        resolution: window.devicePixelRatio
      }
    );

    this.App.renderer.plugins.interaction.autoPreventDefault = false; // notice that after adding this line still can't have scroll work.
    this.App.renderer.autoResize = true;
@rockmandash
Copy link
Author

    this.App.renderer.plugins.interaction.autoPreventDefault = false;
    this.App.renderer.view.style.touchAction = 'auto';

@ryanwellsdotcom
Copy link

@rockmandash renderer.view.style.touchAction = 'auto'; did the trick for me!

@benzkji
Copy link

benzkji commented Apr 30, 2019

is this somewhere documented?! looks like pixi sets this css rule ( touch-action), on the canvas element itself?

@lock
Copy link

lock bot commented May 5, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants