rdbeach / wb

Online collaborative Whiteboard that is simple, free, easy to use and to deploy
https://lcfprep.com/wb2/wb.html
GNU Affero General Public License v3.0
24 stars 13 forks source link

cannot move in mobile screen #6

Open dieungocbao opened 3 years ago

dieungocbao commented 3 years ago

Hello @rdbeach , Whiteboard can draw but cannot move the workspace to another position on mobile. image

scharrua commented 3 years ago

Hi! what about using 2 fingers to scroll/move the workspace?

rdbeach commented 3 years ago

Use the hand button to move around the screen.

Using two fingers is a good idea. I’ll look into it and see what I can do.

dieungocbao commented 3 years ago

Use the hand button to move around the screen.

When using the hand button, I can't move the toolbar or the workspace.

rdbeach commented 3 years ago

Which mobile device are you using? Also which browser? Are you saying that the hand button does not allow you to scroll around the screen?

dieungocbao commented 3 years ago

Which mobile device are you using? Also which browser? Are you saying that the hand button does not allow you to scroll around the screen?

Yes, I can't move when using hand button. I found out that it's working perfectly on physical device (I've test on iPhone with Safari & Chrome) but not working on Android emulator.

Name: Pixel_2_API_28 Target: Android 9.0

itabix commented 3 years ago

Not working on Android (Pixel 3 with Android 11)

parkermaths commented 3 years ago

This still appears to be a problem on the current version. It is not just Android, but appears to be other touch enabled devices as well. It did not work on my Surface Pro, Galaxy Tab or Galaxy S9. It also didn't work in the chrome mobile device preview.

The issue appears to be caused by the lines of code below, which are in board.html, just after the body tag:

        document.addEventListener('touchmove', function (event) {
            if (event.scale !== 1) { event.preventDefault(); }
        }, {passive: false} );

Removing this line of code appears to resolve the issue for me on all devices. However, I am not sure of the actual purpose of this script, other than it is related to touch events, so I don't know if removing this like will break something else. I haven't found anything that it has broken yet though.

Hope this helps.