Closed Bug 1445455 Opened 6 years ago Closed 6 years ago

StatusPanel cannot show the same anchor link twice in a row

Categories

(Firefox :: Tabbed Browser, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 61
Tracking Status
firefox-esr52 --- unaffected
firefox59 --- unaffected
firefox60 --- unaffected
firefox61 --- verified

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Keywords: regression)

Attachments

(2 files)

STR:

1) Visit https://www.mozilla.org/en-US/
2) Scroll down to the bottom and choose a link to hover
3) Hover the link so that the StatusPanel appears in the top-left corner of the screen
4) Move your mouse away from the link (but not over another link) so that the StatusPanel showing the URL hides
5) Hover the _same_ link again, like in step 3

ER:

The StatusPanel should become visible again showing the same link as before.

AR:

The StatusPanel does not appear again.

I highly suspect this is fallout from bug 1444891, but will do a local backout to confirm.
We should probably add a test for this once it gets fixed, fwiw.
Local backout has confirmed that bug 1444891 is the regressor.
Flags: needinfo?(dao+bmo)
I think I've figured this out. Patch and test coming up.
Assignee: nobody → mconley
Comment on attachment 8958625 [details]
Bug 1445455 - StatusPanel needs to update label even when the label text has not changed.

https://reviewboard.mozilla.org/r/227532/#review233388

::: browser/base/content/tabbrowser.js:4618
(Diff revision 1)
> +  // We don't clear the text from the label when setting it as inactive
> +  // to avoid the panel snapping to a short width as it fades away. So
> +  // when clearing the StatusPanel, we actually keep the last URL in the
> +  // label. We still need to know what the last update was to determine
> +  // whether or not to show the panel again, so we stash a copy here.
> +  _lastStatusText: "",

This comment confused me quite a bit, because if the panel keeps the last URL anyway, why bother remembering it a second time? The catch is that 'text' in update() can be empty...

::: browser/base/content/tabbrowser.js:4634
(Diff revision 1)
>        if ((text = XULBrowserWindow[type])) {
>          break;
>        }
>      }
>  
> -    if (this._labelElement.value != text) {
> +    if (this._lastStatusText != text) {

How about:

if (this._labelElement.value != text ||
    text && !this.isVisible) {
Attachment #8958625 - Flags: review?(dao+bmo)
Comment on attachment 8958645 [details]
Bug 1445455 - Test that it's possible to show the same StatusPanel value twice in a row.

https://reviewboard.mozilla.org/r/227556/#review233390

Thanks!
Attachment #8958645 - Flags: review?(dao+bmo) → review+
Flags: needinfo?(dao+bmo)
Comment on attachment 8958625 [details]
Bug 1445455 - StatusPanel needs to update label even when the label text has not changed.

https://reviewboard.mozilla.org/r/227532/#review233388

> How about:
> 
> if (this._labelElement.value != text ||
>     text && !this.isVisible) {

Yeah, I like that better, thanks.
Comment on attachment 8958625 [details]
Bug 1445455 - StatusPanel needs to update label even when the label text has not changed.

https://reviewboard.mozilla.org/r/227532/#review233482
Attachment #8958625 - Flags: review?(dao+bmo) → review+
Pushed by mconley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39af208c6af0
StatusPanel needs to update label even when the label text has not changed. r=dao
https://hg.mozilla.org/integration/autoland/rev/c1126af7196b
Test that it's possible to show the same StatusPanel value twice in a row. r=dao
https://hg.mozilla.org/mozilla-central/rev/39af208c6af0
https://hg.mozilla.org/mozilla-central/rev/c1126af7196b
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Depends on: 1445882
I have reproduced this bug with Nightly 61.0a1 (2018-03-13) on Windows 10 , 64 Bit ! 

This bug's fix is Verified with latest Nightly !

Build   ID    20180317100337
User Agent    Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0

[bugday-20180314]
I have reproduced this bug with Nightly 61.0a1 (2018-03-13) on Ubuntu 16.04 LTS!

This bug's fix is Verified with latest Nightly!

Build   ID    20180317111042
User Agent    Mozilla/5.0 (X11; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0
QA Whiteboard: [bugday-20180314]
As par comment 14 & comment 15 i am marking this bug as verified fixed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: