Drag and drop on long press on links - Android 14
Closed this issue · 23 comments
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.
I do not understand what you mean. what is the url?
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?
I never enabled it. No idea how to disable...
Just tested on my only Android 14 device and it does not happen there...
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...
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 :)
Let's keep it open for a while and see if anyone else has this issue on Android 14
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.
Which other browser have you seen doing this? Is your Android Webview up-to-date?
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.
with same version of Privacy Browser, or did you upgrade it too?
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
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
I downloaded it myself already. Probably a temporary issue at GitHub.
app-release.apk.zip
Here is another upload
...which does not work either
I uploaded it to V2.7 under releases. From there it works...
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?
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
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.
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...
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
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
does not seem to be an issue for others