New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 643772 link

Starred by 6 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

UI buttons flakily don't respond to clicks

Project Member Reported by aga...@chromium.org, Sep 2 2016

Issue description

Version: 52.0.2743.116 (64-bit)
OS: OS X 10.11.6

What steps will reproduce the problem?
(1) Use <cmd+t> to create a new tab
(2) Very quickly click the close button

What is the expected output?
It closes

What do you see instead?
Clicking the button does nothing.

Original twitter thread on unreliable UI buttons: https://mobile.twitter.com/garybernhardt/status/771487309648711680
Video reproduction case: https://vimeo.com/181121815 (read description)

Video description in full:

"""
This is obviously a race condition. In this case, I'm hitting Cmd-T to open a tab and timing a click on the tab's X button immediately after. Zooming in on the audio waveform shows that the Cmd-T and the mouse click are about 140 ms apart.

I don't normally create windows and immediately click the X, of course; it's just easy to demonstrate it in that way. This happens several times per hour in the course of everyday use.

This bug also isn't specific to the close button; again, it's just easy to demonstrate there. It definitely happens with the reload button and the top-left close-window button. I think that it happens with the back/forward buttons too, though I don't use those often. I don't remember seeing it happen with buttons in actual web pages, but I probably would've assumed that failures there were due to JavaScript, since such failures are so common even in a working browser.
"""

In particular, note that this is not just limited to the tab-close button, it has also been observed on reload/stop/forward/back/window-close.
 
Labels: Needs-Feedback
@agable are you able to reproduce this as well, or are you simply passing along the report?

If I Cmd-T and close quickly, I think I am clicking to close before the button actually animates into place, so I'm actually clicking on nothing.

But in the video, it seems like once the reporters are in this state, they can't ever click the close button until they move the tab around in the tabstrip.  That I cannot reproduce, and I'm looking to clarify whether that is actually happening or not.
Yeah, that's definitely what is happening -- the initial click immediately after the tab is created puts something into a bad state so that the button doesn't respond to further clicks until it is reinitialized.

I'm just passing this on -- I don't have a MacOS machine, and this doesn't seem to reproduce on my Ubuntu or ChromeOS boxes.
Cc: rohitrao@chromium.org
I can kinda-sorta reproduce this. What happens for me:

1) Create a new tab
2) Very quickly click where the close button is, before it animates in
3) Keep clicking the close button relatively quickly

None of those clicks are delivered to the close button until I pause clicking or until I move the mouse, so I'm guessing that they are being delivered to the underlying tabstrip as a succession of double clicks and so on.

Note that Safari suffers from the same problem: if you try to click a tab's X as it is animating in, clicks are not delivered until you wait a bit or move the mouse. As such, I suspect this is a Cocoa design behavior around animated elements, or else a Cocoa bug. I am not sure what we would do about this.

However, I cannot reproduce the behavior in the video at all, nor understand how it could happen in theory.

rohitrao@, do you have any idea how we could get into this state?

Comment 4 by rsesek@chromium.org, Sep 21 2016

Cc: -rohitrao@chromium.org
Owner: rohitrao@chromium.org
Status: Assigned (was: Untriaged)

Comment 5 by cblume@chromium.org, Sep 21 2016

 Issue 649066  has been merged into this issue.
We have some weird code that runs a nested run loop if you click on a tab. Theoretically, clicking on the close button should get around this, but I bet if you click during the animation, we end up running that nested run loop until you move the mouse or something.

https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm?q=maybeStartDrag:&sq=package:chromium&dr=C&l=96

Comment 7 by jleedev@gmail.com, Sep 21 2016

Here's a similar example where it gets stuck in rapid closure mode.
Untitled.mov
1.4 MB Download
Labels: -Needs-Feedback Hotlist-PlatformExcellence
I can reproduce the bugs in comments #3 and #7.  I still cannot reproduce the bug in the original report.

For #3, it's definitely related to double-clicks.  If I space my clicks further apart, eventually one of them gets recognized as a click on the close button.  If I go into the system settings and lower my double-click speed, I have to space them even further apart to get the tab to close.

For #7, I can repro but haven't looked at the code yet.  Definitely seems like it's stuck in rapid closure mode.

Comment 9 by sdy@chromium.org, Feb 23 2017

Cc: creis@chromium.org a...@chromium.org shrike@chromium.org sdy@chromium.org ojan@chromium.org
 Issue 662153  has been merged into this issue.

Comment 10 by sdy@chromium.org, Apr 5 2017

Status: Available (was: Assigned)
This Mac quality of life bug haven't been touched by its owner in a while, so I'm bumping it back to "available". Feel free to change it back to "assigned" if you'd rather not have someone else take it.
Labels: MacPE-2018Q1

Comment 12 by ojan@chromium.org, May 8 2018

Cc: -ojan@chromium.org
Status: Assigned (was: Available)
Labels: Hotlist-DesktopUIChecked Hotlist-DesktopUIValid
***Mass UI Triage***

Able to repro the issue on the latest canary 72.0.3618.0 on Mac OS 10.13.6. Opened multiple(20/30) new tabs using Cmd+T and tried closing by clicking on the close button and there were no action on some clicks when trying to close the new tabs clicking on the close button.

Sign in to add a comment