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

fix(module:tooltip): fix tooltip for deeply wrapped focusable elements #6965

Merged
merged 2 commits into from
Sep 5, 2021

Conversation

wzhudev
Copy link
Member

@wzhudev wzhudev commented Sep 2, 2021

close #6955

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Application (the showcase website) / infrastructure changes
[ ] Other... Please describe:

What is the current behavior?

Issue Number: #6955

Since focus and blur are events that don't propagate, nz-tooltip and other components such as nz-popconfirm and nz-popover fail to detect a focus event on a deeply wrapped child element.

What is the new behavior?

Use focusin and focusout events which can propagate and IE11-compatible instead. trigger="focus" works for deeply wrapped focusable child elements.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@wzhudev wzhudev changed the title fix(module:tooltip): fix tooltip for work for wrapped focusable elements fix(module:tooltip): fix tooltip for deeply wrapped focusable elements Sep 2, 2021
@zorro-bot
Copy link

zorro-bot bot commented Sep 2, 2021

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #6965 (ad77220) into master (cbbb9d0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head ad77220 differs from pull request most recent head 7c5f249. Consider uploading reports for the commit 7c5f249 to get more accurate results
Impacted file tree graph

@@           Coverage Diff            @@
##           master    #6965    +/-   ##
========================================
  Coverage   89.53%   89.54%            
========================================
  Files         489      489            
  Lines       15805    15805            
  Branches     2428     2573   +145     
========================================
+ Hits        14151    14152     +1     
+ Misses       1014     1012     -2     
- Partials      640      641     +1     
Impacted Files Coverage Δ
components/tooltip/base.ts 93.48% <100.00%> (ø)
components/tabs/tab-nav-bar.component.ts 83.03% <0.00%> (-0.71%) ⬇️
...ts/table/src/table/table-inner-scroll.component.ts 81.42% <0.00%> (+4.28%) ⬆️

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 cbbb9d0...7c5f249. Read the comment docs.

Copy link
Member

@vthinkxie vthinkxie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vthinkxie vthinkxie merged commit 78c16a2 into NG-ZORRO:master Sep 5, 2021
@wzhudev wzhudev deleted the fix/tooltip-wrapped-focusable branch September 5, 2021 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nz-date-picker nzTooltipTrigger="focus" not working
2 participants