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

Stop window scrolling on touch devices when moving a piece #150

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Tpimp
Copy link

@Tpimp Tpimp commented Sep 1, 2017

Small patch to touchstartSquare. Should be merged upstream after more testing. I have tested on multiple mobile devices without side effect.

Christopher Dean and others added 2 commits August 30, 2017 12:24
fixed to not break scrolling on iOS devices but still prevent screen drag. Tested on Safari iOS, Android Chrome, Blackberry webkit browser.
@davidmpaz
Copy link

Hi @Tpimp. For testing you could give a try to browserstack not real devices but can help to confirm more.

@yamanlutfi
Copy link

Ngentot

@Jacob8765
Copy link

Any news on this?

@marvinIsSacul
Copy link

Hey,

I had a similar problem on touch devices. Below is my solution...


jQuery('#chess_board').on('scroll touchmove touchend touchstart contextmenu', function(e){
e.preventDefault();
});

@bokybanton
Copy link

bokybanton commented Nov 22, 2023

Hey,

I had a similar problem on touch devices. Below is my solution...


jQuery('#chess_board').on('scroll touchmove touchend touchstart contextmenu', function(e){
e.preventDefault();
});

You should add a custom CSS to avoid conflicts with passive events and active events by default like touch. https://developer.mozilla.org/en-US/docs/Web/CSS/touch-action

I solve the problem with your solution but I added a custom css to my board like #myBoard { touch-action:none; } and works perfectly!

I think somebody can pull a fix, it only needs 3 or 4 code lines and can be tracked and encapsulated.

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

Successfully merging this pull request may close these issues.

None yet

6 participants