Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug] A selected tab can be reselected when the title changes #14954

Closed
TrianguloY opened this issue Sep 10, 2020 · 5 comments
Closed

[Bug] A selected tab can be reselected when the title changes #14954

TrianguloY opened this issue Sep 10, 2020 · 5 comments
Assignees
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified eng:ready Ready for engineering Feature:Tabs help wanted Help wanted from a contributor. More complex than good first issue. pin Issues, features, improvements that are still valid

Comments

@TrianguloY
Copy link
Contributor

TrianguloY commented Sep 10, 2020

This is a minor bug, but easy to perform on slow devices / slow internet.

Steps to reproduce

  1. Open a page
  2. As fast as possible, open the tabs tray (press the [1] button)
  3. As fast as possible, long tap the current tab to select it.
  4. Wait for the page to update (either while being loaded, or with the final title)

Expected behavior

The page keeps being selected

Actual behavior

The page is unselected, but the selection remains as '1'. You can select it again, and increase the selection number to 2 or even more.

Multimedia1 (2)

Fast device

If you have a fast device and fast internet connection, so fast that when you open the tabs tray the page is already opened, you won't be able to reproduce this bug with the previous steps (or if you are using an emulator, but there you can set the network type to HSDPA or slower). However the bug also happens if the page's title is changed using 'document.title', so yu can try this:

  1. Open this testing page: https://trianguloy.github.io/githubPages/javascriptEval/javascriptEval.html?setInterval(()=%3Edocument.title=Math.random(),1000)
  2. Press run.
  3. Open the tabs tray, note the changing title of the tab.
  4. Select the tab, and then select again, and again, and again...

Multimedia1

Device information

  • Android device: Tested on a Nexus 5X, android 8.1.0, also on an 8.1.0 emulator
  • Fenix version: Build #2015763059 (also happens on previous versions)

┆Issue is synchronized with this Jira Story

@TrianguloY TrianguloY added the 🐞 bug Crashes, Something isn't working, .. label Sep 10, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Sep 10, 2020
@ekager ekager added Feature:Tabs eng:ready Ready for engineering help wanted Help wanted from a contributor. More complex than good first issue. and removed needs:triage Issue needs triage labels Sep 10, 2020
@TrianguloY
Copy link
Contributor Author

Append: This can also lead to a 'ghost' selection if the tab is closed while selected: testing link: https://trianguloy.github.io/githubPages/javascriptEval/javascriptEval.html?a=window.open()%0AsetInterval(()=%3Ea.close(),5000)
In the original steps, if you try to save the 'ghost' selected tab on a collection, the current tab is saved normally. On the closed tab, if you try to save the nonexistent selected tab, nothing happens (pressing 'save' does nothing) even if you select other tabs.

@stale
Copy link

stale bot commented Mar 9, 2021

See: #17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 9, 2021
@TrianguloY
Copy link
Contributor Author

This bug is still present in the latest nightly version [Nightly 210307 17:01 (Build #2015797323)].
The steps still work reliably.

@stale stale bot removed the wontfix label Mar 9, 2021
@amedyne amedyne added the pin Issues, features, improvements that are still valid label Aug 6, 2021
@Alexandru2909
Copy link
Contributor

I can still reproduce this issue on Samsung Note 10(Android 12). The problem seems to be that when checking if the item is selected, the SelectionHolder holds a version of the tab with different TabSessionState.content. The TabSessionState.id seems to be the same in this case and could be used to better verify the selected/deselected state of the tab.

@Alexandru2909 Alexandru2909 self-assigned this Jan 26, 2022
Alexandru2909 pushed a commit to Alexandru2909/fenix that referenced this issue Jan 27, 2022
Alexandru2909 pushed a commit to Alexandru2909/fenix that referenced this issue Jan 27, 2022
@Alexandru2909 Alexandru2909 added the eng:qa:needed QA Needed label May 17, 2022
@SoftVision-LorandJanos
Copy link

This issue is no longer reproducible with the latest Nightly 102.0a1 (2022-05-18) build.
Device used: google Pixel 4 (Android 12).
Closing the ticket as fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified eng:ready Ready for engineering Feature:Tabs help wanted Help wanted from a contributor. More complex than good first issue. pin Issues, features, improvements that are still valid
Projects
None yet
Development

No branches or pull requests

5 participants