fenix icon indicating copy to clipboard operation
fenix copied to clipboard

[Bug]: If I long-press on URLbar with an externally-copied URL in my clipboard, Android spams a notification "Firefox pasted from your clipboard" which is confusing and covers up the actual "paste" option

Open dholbert opened this issue 3 years ago • 7 comments

Steps to reproduce

  1. Copy a URL from some external (non-Firefox) app. (e.g. in Chrome, visit https://www.example.org/, and then tap their URLbar and then copy-to-clipboard button.)
  2. Open Firefox Nightly.
  3. Long-press the URL bar.

Expected behaviour

Menu should appear saying "Paste | Paste & Go" (and "Copy" if there's already contents in the URLbar)

Actual behaviour

That menu appears but it's covered up by an Android system notification, saying "Firefox pasted from your clipboard".

This notification is troublesome for two reasons: a) it blocks me (for a few seconds) from proceeding with the paste operation that I was about to do. b) it's alarming & feels shady, like something is going on behind my back. I didn't actually paste yet, but Android's alerting me that Firefox already pasted out from under me...? (I know nothing actually-shady is going on; probably Firefox is just inspecting the clipboard to find out if it's a URL so as to offer the appropriate menu options. But this notification doesn't offer any of that subtlety. It just says "Firefox pasted from your clipboard", which feels alarming when all I did was long-press.)

Device name

Google Pixel 4a

Android version

Android 13

Firefox release type

Firefox Nightly

Firefox version

103.2.0

Device logs

No response

Additional information

  • I can reproduce in latest Firefox Nightly as well, version 105.0a1.
  • If you move the Firefox toolbar to the top, that mitigates the problem with the notification covering up our menu (since then our menu is at the top while the notification is still at the bottom). Not really a workaround, just a FYI.
  • This notification only appears the first time you long-press with a given set of clipboard-contents. So if you long-press again after performing the STR, then the notification doesn't show up again. But if you switch apps and copy a new URL and then switch back to Firefox and long-press the URLbar, you'll hit the issue again.

┆Issue is synchronized with this Jira Task

dholbert avatar Aug 20 '22 15:08 dholbert

Screencast: https://user-images.githubusercontent.com/426803/185754040-fecb5e9e-82ae-4c81-b57e-3dfac13e5f40.mp4

Screenshot of the moment the issue happens (when I want to tap "Paste"/"Paste&Go" but they're covered up by the notification that confusingly tells me that Firefox already pasted even though I didn't ask it to yet): screenshot-2022-08-20-081854

dholbert avatar Aug 20 '22 15:08 dholbert

That is the system notification, and we do not control the content. I do agree it is confusing.

mcarare avatar Aug 22 '22 07:08 mcarare

Hello, I can reproduce the issue as described with Google Pixel 6 (Android 13) on the latest Nightly from 08/22.

delia-pop avatar Aug 22 '22 10:08 delia-pop

That is the system notification, and we do not control the content.

Yup, I know/understand. Nonetheless, we're doing something to make it appear; and we're simultaneously popping up our own menu directly behind it, with options that we know that the user probably wants to tap.

I do agree it is confusing.

FWIW for me personally, the main pain-point here isn't the confusion; it's more the usability issue.

dholbert avatar Aug 22 '22 17:08 dholbert

Hey, found the issue interesting had a look running current master.

Found something else when testing, if the field is empty and the clipboard contain a non url text then when trying to paste the notification will trigger but no option to paste will appear (If there is text in the url/search bar then Copy or Paste is offered). Should it be opened in it's own issue ?

The notification issue is linked to the "Paste & Go" option which require to check the content of the clipboard. Built a quick version without it and the notification appear only after the text is pasted. Additionally since it's a simple paste the keyboard open and the notification appear over it so it's less intrusive (the pasted text is still visible).

Due to the delay before the notification disappear the "Paste & Go" make navigation simpler but slower; if the option is not offered the user need to press navigate but it's still visible even when the notification is active.

I don't think moving the different actions is really possible (moving it over the urlbar would obfuscate it not really pertinent if the user want to copy ? and moving those actions anywhere else would make them disjointed ?).

So as a fix the only option i see at the moment is to remove the "Paste & Go" option or is there something else I'm missing that could be done ? :thinking:

Timshel avatar Sep 14 '22 15:09 Timshel

Users have the option to disable the toast message alert from the OS settings menu (Settings -> Privacy -> Show clipboard access toggle).

mcarare avatar Sep 19 '22 14:09 mcarare

removing needs ux label - i'm not sure what we can do here to improve the situation without first understanding all the constraints and possibilities from eng. from what i can tell this notification is controlled by the OS and caused by the paste and go feature. i don't believe we are wanting to remove the feature. none of that makes it less frustrating though.

lime124 avatar Sep 22 '22 21:09 lime124

Note that the flow while similar is worse (imo) when the intent is to copy.

After the long press the user get a vibration feedback, the options open (copy, paste ...) but is masked by the OS notification. If one just quickly glance at it they might think that the url is copied (got tricked recently :sweat_smile:) and will realize it's not the case only when trying to paste it later on (why I call it worse).

Additionally while minor it means that Fenix unnecessarily read the clipboard (but no way to know the user intent).

Timshel avatar Sep 24 '22 13:09 Timshel

Hey, Some feedback on the issue ? Got "tricked" again yesterday when copying an url; between the vibrating feedback and the OS notification masking the buttons I was already switching app before I remembered that I had in fact not copied the url :sweat_smile:.

Timshel avatar Oct 07 '22 10:10 Timshel

While discussing https://github.com/mozilla-mobile/fenix/issues/27182 @Mugurell mentioned https://github.com/mozilla-mobile/fenix/issues/22271 which introduced the logic to determine if we may have an url without reading the clipboard.

The logic was previously introduced but was then removed due to different bugfixes. Created a PR to revert it.

Timshel avatar Oct 10 '22 11:10 Timshel

Hey, I created a PR would be interested on some feedback on it :)

Timshel avatar Oct 25 '22 08:10 Timshel

Ping

Timshel avatar Nov 02 '22 13:11 Timshel

Pong

Timshel avatar Nov 15 '22 12:11 Timshel

Hey there! Sorry for the delay on this, but thanks the original report, and @Timshel for proposing a patch! I'll help find someone to help review that PR.

onemahon avatar Nov 16 '22 22:11 onemahon

Happy new year :).

Hey, PR is still blocked since changes fix another issue (https://github.com/mozilla-mobile/fenix/issues/27182) for which nobody has been able to give any details/insight.

Timshel avatar Jan 03 '23 10:01 Timshel

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1810045

Change performed by the Move to Bugzilla add-on.

cpeterso avatar Jan 12 '23 23:01 cpeterso

QA is not needed.

cpeterso avatar Jan 13 '23 00:01 cpeterso