Open Bug 1442238 Opened 6 years ago Updated 2 years ago

Disabling cosmeticAnimations also changes stop/reload button behaviour

Categories

(Firefox :: Toolbars and Customization, defect, P3)

58 Branch
defect

Tracking

()

Tracking Status
firefox58 --- affected

People

(Reporter: eda, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180206200532

Steps to reproduce:

Visit a plain HTML page which takes a few seconds to fully download.  (To make a test case, perhaps a CGI program which prints one line every second for a few seconds.)

While the page is loading, move the mouse pointer to the Stop button on the toolbar.  Click to stop the page loading.

However, just an instant before the user's mouse click, the page does finish downloading from the server.


Actual results:

Because the page finishes loading a moment before the click, the button underneath the mouse pointer changes from Stop to Reload, so the user accidentally clicks on Reload by mistake.  (However fast the user's reactions, they are only human, so inevitably there will be a race condition between seeing the Stop icon on the screen and the icon changing before the mouse click is received by the application.)

This means that while the user intended to stop the page loading, they have actually requested to load the slow page all over again -- the opposite of what they intended!


Expected results:

Assuming that going back to two separate buttons is not on the cards...

The icon should not instantaneously change from Stop to Reload as soon as the page has finished.  It should change to an intermediate state (perhaps a greyed-out Reload) for a short instant, just long enough to make sure that an intended user interface click on Stop doesn't hit Reload by mistake instead.  Possibly this delay can be a little bit longer if the mouse pointer is already hovering over the Stop button.

(The fact that the icon is momentarily greyed out doesn't mean that the page cannot be reloaded immediately by hitting Ctrl-R.)
I think the correct component for this issue would be Firefox:Toolbars and Customization. Please correct if this is not the right component.
Component: Untriaged → Toolbars and Customization
It would be great if you could provide a sample test cases showing the issue. Thanks.
Flags: needinfo?(eda)
(In reply to eda from comment #0)
> It should change to an intermediate state (perhaps a
> greyed-out Reload) for a short instant, just long enough to make sure that
> an intended user interface click on Stop doesn't hit Reload by mistake
> instead.

This is exactly what I see happen when I e.g. reload this bugzilla page. The button animates to change to 'stop'. It animates again (and becomes disabled!) for about ~1s before it shows 'reload' again. This is intentional. Can you elaborate on whether you can reproduce this issue e.g. with this bugzilla page, or perhaps do a screencast of what you're seeing?
Hmm, and I do see that animation with this Bugzilla page too.  Yet I did not see it on the page I was using.  That page was one with a large HTML table, and I may have had the Firefox window at a monster size of about 8500 * 5000 pixels tiled across three high-resolution monitors.  So it could be something to do with rendering delay.  I will go back and check I can reproduce this again.
Flags: needinfo?(eda)
(In reply to eda from comment #4)
> Hmm, and I do see that animation with this Bugzilla page too.  Yet I did not
> see it on the page I was using.  That page was one with a large HTML table,
> and I may have had the Firefox window at a monster size of about 8500 * 5000
> pixels tiled across three high-resolution monitors.  So it could be
> something to do with rendering delay.  I will go back and check I can
> reproduce this again.

Thanks for checking. Do you see the colour of the icon also change (from black to grey and then back to black) while hovering it during this animation?

In any case, yes it would be helpful if you could check how/when this doesn't work for you. It's possible it only happens on specific pages, in which case a testcase would really help us. Do let us know. :-)
Flags: needinfo?(eda)
I think I know what it is.  On the machine where I see this bug I have the configuration setting

toolkit.cosmeticAnimations.enabled;false

So I think the bug should be that either;

(a) the greying out of the reload button isn't a 'cosmetic' animation, so it should not be affected by the above preference; or

(b) if cosmetic animations are turned off then by all means the *animation* of the button should be stopped, but the *functionality* described in the 'Expected results' above should still be in place.  The best answer would be to transition to a greyed-out Reload button for a moment.  Don't do any cutesy animation; just change the button to grey and then change it to black.
Flags: needinfo?(eda)
Summary: User interface issue: Combined refresh/stop button race condition → Disabling cosmeticAnimations also changes stop/reload button behaviour
Blocks: 1352069
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.