Fulguris icon indicating copy to clipboard operation
Fulguris copied to clipboard

Freeze on tap and hold images

Open HarshWaves opened this issue 3 months ago • 11 comments

Description

Long pressing on an image to open in a new tab hangs up my Tablet's UI real bad. The screen gets stuck and tapping anywhere doesn't do anything. I have to restart my Tablet, only then does the issue resolves.

Environment

  • Device: Lenovo TB-8504X
  • OS: Android 8.1
  • Version: 1.10.3 and older ones too

HarshWaves avatar Sep 29 '25 13:09 HarshWaves

Could you provide a link to an image to reproduce that issue? Could you provide your WebView version? You can find it from Menu > Settings > About > WebView. It's likely an issue with your device and WebView. There is possibly little we can do to help with that. Your best bet is to update your WebView. Do check with other WebView based Web browsers to see if they have the same issue.

Thanks for you feedback.

Slion avatar Sep 30 '25 11:09 Slion

There's no specific image here. It's just any image that can be found on the internet. But if you really want to, just go to this link and long press on any image.

https://www.google.com/search?client=fulguris&sca_esv=5bf609620c87c314&udm=2&fbs=AIIjpHyTFN8BbSyNXQ3oA-fn7H5NUrrIpQXg7ywPuzBdcoqHY9koTyP2YoWqyTioW_DKM8fFBRNZm4gOjmfmYLVfCGgeCLdGJxSRSlfKJx2_1LLQWw5atBb6SzuXN7iJ5IwTzFgg-P7TaJT8ATMzjiZ4aROE61KPd3ou9mRFNW6wt7TiNUySfkkiBJofaebIedH-IW_yr9ZTRm2wGzw96nlYcfdG-bofPbeMg96-g7_bc-YgVs0tUg4&q=ducklings&sa=X&ved=2ahUKEwi1uLH1kYKQAxXG1zgGHXGADYIQtKgLegQIEBAB&biw=601&bih=962&dpr=1.33

Mine UI freezes when i do it. Webview Version: Chrome/138.0.7204.179 And I use "Via" as my second browser. It's also a webview based browser, but it doesn't happen in its case. I can long press on any image, and the UI is totally fine.

I thought of providing you screenshots but after the UI freezes I can't really do anything, let alone take screenshots. Same with a screen recording as well. The recording might capture everything, but since I have to force restart my Tablet, it becomes corrupted and I can't view it.

HarshWaves avatar Oct 01 '25 04:10 HarshWaves

Thanks, if you are using the ad blocker try disabling it and see if it helps.

Can't reproduce on HUAWEI P8 lite 2017 running Android 7. Can't reproduce on Samsung Galaxy S8+ running Android 9. Can't reproduce on Samsung Galaxy S7 Edge running Android 8.

Slion avatar Oct 01 '25 06:10 Slion

I already tried that but sadly it didn't work. Is there any problem with my webview or device?

HarshWaves avatar Oct 03 '25 13:10 HarshWaves

Yes and no:

  • Yes: Because so far I failed to reproduce your issue on any other device
  • No: Because it works with Via which also uses WebView

Unless I find a way to reproduce the issue I would need to add some logging and get you to give me those logs in the hope it helps me understand what's going on.

Which version of Fulguris are you using? Play Store, F-Droid or Download?

Slion avatar Oct 03 '25 13:10 Slion

I'm using the latest version from Fdroid.

Okay, so I tried experimenting a bit and let me tell you exactly what happens. When I long-press on images for about a second, everything works fine; a toolbox appears with options like "open in new tab" and similar features. However, the problem arises when I tap and hold for longer than a second. In this case, a small transparent copy of the image appears along with the toolbox right beneath my fingers, causing my tablet's UI to hang or freeze. If I'm careful to release my hold before the transparent copy appears, I can easily avoid the freeze.

And the Via Browser is totally fine because the small transparent copy of the image never appears in it. Just the toolbox.

HarshWaves avatar Oct 03 '25 17:10 HarshWaves

By toolbox you mean the context menu?

Definitely a WebView issue on your device then, but I should be able to workaround it much like Via did. That image and link drag feature was added relatively recently in WebView so it's something that did not exist when your older device last received updates.

I reckon I should be able to disable the drag by doing:

webView.setOnLongClickListener(v -> true); // Consume the long press
webView.setHapticFeedbackEnabled(false);   // Optional: suppress vibration

Or

@Override
public boolean onDragEvent(DragEvent event) {
    return true; // Consume all drag events
}

We could also add a settings option for the time it takes to open the context menu. Right now I believe it matches the delay WebView is using to trigger the drag. The result is that most times the drag triggers at the same time the context menu opens. Sometimes the context menu opens without drag. So if user sets the delay lower it should cancel out the drag every time. The downside being that you can't use drag then. Setting it higher should allow user to use both drag and context menu. As it is you can already discard the context menu while keeping the drag active by tapping outside the context menu while keeping the first contact point to hold the drag.

Slion avatar Oct 03 '25 18:10 Slion

Yes, yes, that context menu!

If that's the case, I really hope it resolves my issue then. I chose fulguris since it's fast and lightweight. Other browser either lag or are not as smooth as it. And since it's open source, I can easily log in to sensitive sites without any worries. It's because of this reason that I've set fulguris as main and Via as the second browser.

I would like to say one more thing. I don't know if this can be even considered a bug, but if you've used gemini ai web, then there's a canvas feature in it that lets the user see the preview of their code written. Fulguris browser doesn't seem to support that preview, or it might just be my device, I don't really know. All I see in the preview tab is just a blank white canvas and nothing more. Maybe solving this would require you to add some sort of library, which might not leave fulguris as lightweight as it is right now, I can't really say. I thought I'd just let you know.

HarshWaves avatar Oct 03 '25 18:10 HarshWaves

Please open a new issue with links and instruction to reproduce that problem. Was reported as #705.

Slion avatar Oct 03 '25 18:10 Slion

I could manage to have smaller delay than the system standard like 250ms or 200ms, for long press and that prevents the standard drag to trigger. I believe that's what Via is doing. However I can't get longer delay to work, the drag gets in the way. Would need to take a closer look.

Related to #127 and #538.

Slion avatar Oct 19 '25 18:10 Slion

Thanks for your hard work!

HarshWaves avatar Oct 20 '25 05:10 HarshWaves