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

Components: Fix stuck tooltips by testing child disabled attribute #3498

Merged
merged 1 commit into from Nov 16, 2017

Conversation

Projects
None yet
2 participants
@aduth
Member

aduth commented Nov 15, 2017

Fixes #3481
Related: #3177

This pull request seeks to address an issue where tooltips may become stuck for disabled buttons. As described at #3481 (comment), the issue is that event.target of a mouseenter event may be a non-disabled child of a disabled button (e.g. an SVG's path node). The changes proposed here update the condition to test the wrapped element of the tooltip receiving the bubbled event (the button itself).

Testing instructions:

Repeat steps to reproduce at #3481 (comment), verifying that it is not possible to encounter a stuck tooltip.

Ensure that tooltips are shown correctly when expected (enabled IconButtons).

Ensure that updated unit tests pass:

npm run test-unit components/tooltip/test/index.js

@aduth aduth added the UI Components label Nov 15, 2017

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Nov 15, 2017

Codecov Report

Merging #3498 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3498   +/-   ##
=======================================
  Coverage   34.65%   34.65%           
=======================================
  Files         260      260           
  Lines        6741     6741           
  Branches     1220     1220           
=======================================
  Hits         2336     2336           
  Misses       3719     3719           
  Partials      686      686
Impacted Files Coverage Δ
components/tooltip/index.js 72.34% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f31557...9436568. Read the comment docs.

codecov bot commented Nov 15, 2017

Codecov Report

Merging #3498 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3498   +/-   ##
=======================================
  Coverage   34.65%   34.65%           
=======================================
  Files         260      260           
  Lines        6741     6741           
  Branches     1220     1220           
=======================================
  Hits         2336     2336           
  Misses       3719     3719           
  Partials      686      686
Impacted Files Coverage Δ
components/tooltip/index.js 72.34% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f31557...9436568. Read the comment docs.

@aduth aduth merged commit 38d0c74 into master Nov 16, 2017

3 checks passed

codecov/project 34.65% (+0%) compared to 3f31557
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@aduth aduth deleted the fix/3481-tooltip-disabled branch Nov 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment