mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.2k stars 2.92k forks source link

Weird behavior of "close all tabs" button #22552

Open DianaABarladeanu opened 5 days ago

DianaABarladeanu commented 5 days ago

Steps to reproduce

  1. Install FF.
  2. Make sure you have some tabs in tab tray.
  3. Go to tab tray and tap on the trashcan button.
  4. Choose "cancel".
  5. Try to move the position of one of the tabs.
  6. Observe.

Expected behavior The tab can be easily moved, no pop up message is displayed.

Actual behavior Once you try to move a tab, the "close all tabs/cancel" pop up is displayed. The issue is reproducible on both normal and private tab tray.

Device & build information

https://github.com/user-attachments/assets/5e4019cd-3a81-46fa-ae23-c3be4fa7b39a

┆Issue is synchronized with this Jira Task

data-sync-user commented 3 days ago

➤ Norberto Andres Furlan commented:

ih-codes could be that your PR will fix this one too?

data-sync-user commented 3 days ago

➤ ih-codes commented:

I just checked, and unfortunately that appears to be unrelated to my work.

HOWEVER, I’m pretty sure I know why this is happening though. Just looked and it appears to be the exact same bug I was discussing with Orla yesterday in a different area of Redux.

Line 98 of TabTrayState should return a newly initialized TabTrayState instead of the previous state. And it should set showCloseConfirmation to false.

Someone else can pick this up or I can try to push a fix after my current tab scroll PR is ready. Should be a simple fix.

data-sync-user commented 3 days ago

➤ ih-codes commented:

Scratch that. I’m going to have to fix this bug for other things I want to do anyway, so I’ll either do it in my PR or a separate PR. 👍