Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck tooltips #3481

Closed
mtias opened this issue Nov 14, 2017 · 9 comments
Closed

Stuck tooltips #3481

mtias opened this issue Nov 14, 2017 · 9 comments
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended

Comments

@mtias
Copy link
Member

mtias commented Nov 14, 2017

Happens often that I end up with stuck tooltips in the UI:

image

@mtias mtias added General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended labels Nov 14, 2017
@aduth
Copy link
Member

aduth commented Nov 14, 2017

Needs reliable steps to reproduce. I cannot recreate this issue.

Previous issues with disabled buttons were intended to be addressed in #3177.

@aduth aduth added the [Status] Needs More Info Follow-up required in order to be actionable. label Nov 14, 2017
@ephox-mogran
Copy link
Contributor

I can't replicate this sporadically. I'll see if I can get a replication case.

@ephox-mogran
Copy link
Contributor

I've only seen it happen with Redo, so it probably is a race condition somewhere with disabling and mutation observers.

@ephox-mogran
Copy link
Contributor

I've got Undo's popover sticking as well. Also when disabled.

@ephox-mogran
Copy link
Contributor

Essentially, before it happens, the button is disabled but if you hover over that disabled button, the tooltip still appears.

@ephox-mogran
Copy link
Contributor

Still not 100%, but I have it happening regularly now.

@ephox-mogran
Copy link
Contributor

An interesting part of it is that when you move the cursor over the buttons in the toolbar, the tooltip will only appear if you have previously moved over a non-disabled button. If you have moved over a disabled button, then the tooltip won't appear. I think it is related to that.

@ephox-mogran
Copy link
Contributor

The best replication case I have is focus the PostTitle, and move the mouse left and right past either end of the header toolbar, stopping at each end. You don't need to click at all. Vary the speed and within a minute, it will probably happen once.

@aduth
Copy link
Member

aduth commented Nov 15, 2017

The best replication case I have is focus the PostTitle, and move the mouse left and right past either end of the header toolbar, stopping at each end. You don't need to click at all. Vary the speed and within a minute, it will probably happen once.

Nice steps. I was eventually able to reproduce.

It seems that the issue is occurring at this check:

// Mouse events behave unreliably in React for disabled elements,
// firing on mouseenter but not mouseleave. Further, the default
// behavior for disabled elements in some browsers is to ignore
// mouse events. Don't bother trying to to handle them.
//
// See: https://github.com/facebook/react/issues/4251
if ( event.target.disabled ) {
return;
}

Where in some cases the event target is children of the SVG, in my experience a path node which is not disabled. I think it may be a matter of changing this to test event.currentTarget, i.e. the node being wrapped (the possibly-disabled button).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants