mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.23k stars 2.94k forks source link

You can open multiple “Open this link in an external app?” prompts #22412

Open cpeterso opened 1 month ago

cpeterso commented 1 month ago

Steps to reproduce

  1. Load a YouTube web page, such as https://m.youtube.com/watch?v=LtOGa5M8AuU
  2. Tap the “Open App” button on the page.
  3. Firefox will show an “Open this link in an external app?” prompt.
  4. Tap the “Open App” button again and again and again...

Expected behavior

There should only be one “Open this link in an external app?” prompt. Each subsequent prompt should cancel/deny the previous prompt.

Actual behavior

Multiple “Open this link in an external app?” prompts, stacked vertically. See the attached screenshot.

Device & build information

Notes

IMG!UNITO-UNDERSCORE!0475

┆Issue is synchronized with this Jira Task

cpeterso commented 1 month ago

Safari and Chrome avoid this problem by making their prompts modal. You must dismiss the prompt before you can interact with the page again.

If you tap YouTube’s “Open App” button a second time in Chrome after denying the first prompt (with “Don’t Allow”), Chrome will open the YouTube app without prompting. I don’t know if that is a feature or a bug.

abodea commented 1 month ago

Hello, please note that we had this issue before, and it was closed by Andi: https://mozilla-hub.atlassian.net/browse/FXIOS-8320. The bug appeared as QA Verified, but it was never fixed to be verified. Adding this issue as it might help to track down a fix @cpeterso @afurlan-firefox @PARAIPAN9

cpeterso commented 1 month ago

I see that I reported that original bug https://github.com/mozilla-mobile/firefox-ios/issues/18438. I thought this bug seemed familiar. 🙂

data-sync-user commented 1 month ago

➤ Norberto Andres Furlan commented:

Stefan Vladut do you remember this one? I remember you had a PR for the modal but I don’t know what happened.

CC: Alexandru Farcasanu for visibility

data-sync-user commented 1 month ago

➤ Stefan Vladut commented:

Norberto Andres Furlan I did have a PR for this as a custom UIView but it was not accepted because it would have introduced a lot of complexity in all the other features of the app, as this view would have needed to be managed in all the other interactions to avoid introducing bugs like not being able to interact with the screen or not being able to navigate through the webview