Oromis / touch-vtt

Introduces touch screen support to FoundryVTT
40 stars 26 forks source link

Scrolling on items triger to drag them #91

Closed kontokontovtt closed 2 months ago

kontokontovtt commented 2 months ago

Hello I have found out that when you are on mobile (using Mobile Improvements) and try to scroll around in a sheet or elsewhere that underneath is a dragable item, its only possible to drag.

Before the 4 latest updates it was possible to scroll using two fingers but now its not

If it helps somehow i have found out that using the module PopOut! and poping out the character sheet the scrolling becomes active again using just one finger.

I can understand the use of minimizing with the magnifier in order to get some blank space to scroll but the option to scroll with two fingers was faster on the mobile.

Aioros commented 2 months ago

I'll take a look soon, thanks. In the meantime, could you tell me what Foundry version you use and what kind of window you're trying to use the two-finger scroll on?

kontokontovtt commented 2 months ago

I am currently using foundry version 12.331 And system version DnD 3.3.1

Now the issue is while using two fingers for scrolling in the new style character sheets, but not only there. The issue is as you tap two fingers for scrolling the scroll gets stuck and you cannot effectively do anything until you stop taping As i mention before the previous behaviour was scrolling with two fingers on any window opened (character sheet, settings configuration etc where there was underneath the tap a dragable item)

Aioros commented 2 months ago

Strange, it seems to work for me with the same setup. Would you mind enabling debug mode in the TouchVTT settings, opening the console (with F12) and sending me a nice big chunk of the logs that you see there when you try to scroll? It might be helpful.

Also, you mentioned that it worked "before the last 4 updates", do you mean that literally, in the sense that it worked in v2.2.4 but not in v2.2.5?

kontokontovtt commented 2 months ago

image Would you like me to upload an export of the full log?

Indeed in the older versions this issue was not occur Now about the version i am not sure if it was 2.2.4 i can try to find the version that everything worked correctly.

Aioros commented 2 months ago

When you are in debug mode, you should see a lot of new rows showing up in that console at the bottom every time you touch the screen. What I would like you to do is, open the problematic sheet, go to the console, clear it by clicking the "Clear console" button on the top left (or Ctrl-L), and then try your scrolling gesture on the sheet. Then copy the whole bunch of new logs from the console and paste it either directly in a reply here, or in a text file that you can attach. Sorry if it's a bit convoluted, I don't have a better method yet.

If you are able to check with version worked for you, that would also be helpful. Thank you so much for your help in any case.

kontokontovtt commented 2 months ago

I have found that the latest version that the two finger scrolling was version 2.1.3 (probably something is happening from my side in the introduction of version v2.1.3-1-gc7ccdf6 and after) I have installed one by one all the previus versions and only 2.1.3 i am not facing the scrolling issue

Now i am having trouble to get the console log from the mobile browser side as i can not find the dev tools in an android phone's browser. I did try to capture in the dm's console (pc side) but i figure out that the inputs was captured only per user so console shows nothing for the mobile user

How am i going to capture the log from players/mobile side?

kontokontovtt commented 2 months ago

I have managed to capture the log from the phone with a little research (https://developer.chrome.com/docs/devtools/remote-debugging/#troubleshooting)

log.log

kontokontovtt commented 2 months ago

Ok i think i have found the cause

The issue persist if the canvas is disabled. I tested to enable the canvas and scrolling with two fingers and it works that way

Aioros commented 2 months ago

Wow, that's a good catch. I'll get on it as soon as I can and let you know when it's fixed.

Aioros commented 2 months ago

Alright, v2.2.9 is out and it should fix the issue. Thank you for helping! Let me know if it works for you.

kontokontovtt commented 2 months ago

Yes it is now working Thank you

kontokontovtt commented 2 months ago

Respectfully i would like to propose a different approach to the scrolling issue as it would be really nice to work just with one finger. Please excuse if my idea cannot be applied due to other reasons far from my knowledge Is it possible to triger the state of draging items inside sheets/windows with a button in order to stop conflict between the two states (draging and scrolling)?

Aioros commented 2 months ago

It's tricky, I think. I can enable/disable the two-finger-scrolling on command, but I don't think I can easily disable every type of drag and drop and put it back; some applications use Foundry's own drag and drop, some the HTML5 drag and drop directly, some have 3rd-party plugins. I don't think it's possible (or at least, I don't think it's realistic) to find a good way to control all of them.

I'll close this issue for now, but thanks in any case for the help and the suggestion. I'll keep thinking about it.