woheller69 / browser

A privacy oriented web browser with Greasemonkey style script support and Cookie Banner Blocker
GNU General Public License v3.0
160 stars 18 forks source link

Drag and drop on long press on links - Android 14 #40

Closed Mega853 closed 2 months ago

Mega853 commented 3 months ago

I wanted to long press on a link on a website to open it in a new tab, however this does not only open up the usual long press dialog box but also starts using drag and drop for the link text. This results in the browser opening a new tab with the text of the link put into the standard search engine, as soon as I let go from the long press.

woheller69 commented 3 months ago

I do not understand what you mean. what is the url?

Mega853 commented 3 months ago

I just checked, it happens on Android 14 with any element on websites that has an href attribute, also pictures. (Not on Android 12; I don't have 13 to check for that though)

I have seen another browser do this, but it is basically user controlled with that one.

Maybe you can add a toggle in the settings to turn off drag an drop capability of the app?

woheller69 commented 3 months ago

I never enabled it. No idea how to disable...

woheller69 commented 3 months ago

Just tested on my only Android 14 device and it does not happen there...

woheller69 commented 3 months ago

Current tsrget SDK is 33. So it is not even compiled for Android 14 and your device should behave like an older version in that case. So it sounds more like an Android 14 bug in your device...

Mega853 commented 3 months ago

Alright, then I'll leave you to it and try using the app again if I get an android update.

Love the Idea of your app with the one-hand use concept and quick settings, nicely done :)

woheller69 commented 3 months ago

Let's keep it open for a while and see if anyone else has this issue on Android 14

woheller69 commented 3 months ago

Seems to be somehow related to that stuff https://developer.android.com/develop/ui/views/touch-and-input/drag-drop But none of that is implemented.

woheller69 commented 3 months ago

Which other browser have you seen doing this? Is your Android Webview up-to-date?

Mega853 commented 3 months ago

I updated my android webview, but the problem still remains, however in the other browser where I could use drag and drop before (Privacy Browser) it doesn't work anymore.

woheller69 commented 3 months ago

with same version of Privacy Browser, or did you upgrade it too?

woheller69 commented 3 months ago

There were some changes in Webkit with respect to Image Drag stuff, recently. https://android.googlesource.com/platform/frameworks/support/+log/b5166f9a1e9c047162d1215884c3e2cd41a4a74a/webkit/webkit

Here is a version using the same Webkit version 1.10.0 as Privacy Browser (they recently upgraded to 1.10.0). Can you please test it?

If needed: backup app data Uninstall Remove .zip Install app-release.apk.zip

Mega853 commented 3 months ago

Can do, but the link doesn't work unfortunately :/ (it shows 404 and some kind of cache error after)

Maybe the credentials in the redirection of the link are invalid

woheller69 commented 3 months ago

I downloaded it myself already. Probably a temporary issue at GitHub.

woheller69 commented 3 months ago

app-release.apk.zip Here is another upload

...which does not work either

woheller69 commented 3 months ago

I uploaded it to V2.7 under releases. From there it works...

Mega853 commented 3 months ago

Got it, however that didn't lead to the solution.

I tried around a bit and discovered the webview dev tools together with the webview flags and the problem only occurs if the "WebViewImageDrag" flag is enabled. Apparently the default setting on Android 12 is "disabled" and on Android 14, or rather my Android 14 version in particular, it is "enabled".

I am pretty sure that you can recreate the problem by forcing the webview flag to be enabled on your device, however I am not sure how you will be able to prevent this problem for all devices, maybe your app could force certain webview flags?

woheller69 commented 3 months ago

maybe you are using a webview beta version. On my Android 14 device it still does not happen if I activate this flag via Stoutner Browser

Mega853 commented 3 months ago

Are you sure? I didn't sign up for any beta and use the current version 122.0.6261.105 on both my devices, and was able to change the behavior on both with this setting.

Try enabling the flag, restarting your browser and long pressing any hyperlinks on websites that you visit with your browser.

With Stoutner browser the 'bug' went away, maybe because I did the webview update.

woheller69 commented 3 months ago

Phone with Android 14. Same webview version as yours. Flag WebViewImageDrag changed from default to enabled. "Experimental features" is also shown with a notification.

Open FREE browser. Long click on any hyperlink. Context menu opens, nothing else...

Mega853 commented 3 months ago

Hm okay, sounds like a Manufacturer/ROM specific bug, since both my devices are OnePlus devices (9 Pro/Android 12 and 12/Android 14)

I guess you could just document this bug an the fix as a known issue or a part of FAQs then

woheller69 commented 3 months ago

I guess for a "normal" user modding webview flags is not a real fix... Android 14 is still new, I guess such bugs will be fixed in a while

Will keep this open and see if there are more users with this issue

woheller69 commented 2 months ago

does not seem to be an issue for others