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

Component: IconButton tooltip persists when button becomes disabled #3067

Closed
aduth opened this issue Oct 19, 2017 · 0 comments · Fixed by #3177
Closed

Component: IconButton tooltip persists when button becomes disabled #3067

aduth opened this issue Oct 19, 2017 · 0 comments · Fixed by #3177
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended

Comments

@aduth
Copy link
Member

aduth commented Oct 19, 2017

Issue Overview

Mouse events that the Tooltip relies upon for determining when to show and hide a tooltip are not fired for disabled nodes. As a result of the implementation in #2405, it was decided that it is fine for tooltips not to be shown for these disabled elements. However, where this becomes an issue is when a button becomes disabled while a tooltip is already visible, where the tooltip is then permanently stuck on screen because the mouseleave event will not be fired to dismiss the tooltip.

Steps to Reproduce (for bugs)

  1. Navigate to Posts > Add New
  2. Using mouse, press the Undo button until button is disabled
  3. Move mouse away from Undo button

Expected Behavior

Tooltip should be dismissed.

Current Behavior

Tooltip is stuck.

Possible Solution

The tooltip assumes a single child, in this case the button element. We could check for changes to the disabled prop, but it's not guaranteed that DOM attribute is exclusively dependent on a prop by this name.

A more extreme approach might be to attach a MutationObserver to find when the disabled DOM attribute is applied to the tooltip child.

@aduth aduth added [Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended labels Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant