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 accessing destroyed view #4387

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

wzhudev
Copy link
Member

@wzhudev wzhudev commented Nov 5, 2019

close #3875
close #4317
close #4386

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] 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: N/A

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@pr-triage pr-triage bot added the PR: draft label Nov 5, 2019
@netlify
Copy link

netlify bot commented Nov 5, 2019

Deploy preview for ng-zorro-master ready!

Built with commit 455d90c

https://deploy-preview-4387--ng-zorro-master.netlify.com

@codecov
Copy link

codecov bot commented Nov 5, 2019

Codecov Report

Merging #4387 into master will increase coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4387      +/-   ##
==========================================
+ Coverage   92.11%   92.23%   +0.12%     
==========================================
  Files         521      521              
  Lines       11078    11082       +4     
  Branches     2010     2010              
==========================================
+ Hits        10205    10222      +17     
+ Misses        446      436      -10     
+ Partials      427      424       -3
Impacted Files Coverage Δ
...mponents/tooltip/base/nz-tooltip-base.directive.ts 93.75% <100%> (+0.17%) ⬆️
components/select/nz-select.service.ts 86.22% <0%> (+2.63%) ⬆️
components/core/addon/string_template_outlet.ts 84% <0%> (+16%) ⬆️

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 2a71c43...455d90c. Read the comment docs.

@wzhudev wzhudev requested a review from vthinkxie November 5, 2019 14:24
@wzhudev wzhudev marked this pull request as ready for review November 5, 2019 14:24
@wzhudev
Copy link
Member Author

wzhudev commented Nov 5, 2019

Tested with the reproduction in #4386. This fix works.

截屏2019-11-0522 27 52

Copy link
Member

@simplejason simplejason left a comment

Choose a reason for hiding this comment

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

LGTM

@Svetomechc
Copy link
Contributor

Svetomechc commented Nov 12, 2019

image

That's what happens after this PR if you try to go to a different route from a button with nz-tooltip (it was fine in 8.4.1 and before). The whole app becomes unusable after that until you hit F5.

@wzhudev
Copy link
Member Author

wzhudev commented Nov 13, 2019

@Svetomechc Could you make a reproduction? It looks that calling hide in ngOnDestroy is redundant...

@Svetomechc
Copy link
Contributor

Svetomechc commented Nov 13, 2019

Okay, @wendzhue, created a reproduction. This is a pretty serious error which made me revert to 8.4.1.

UPD: Turns out it happens in previous versions too. I didn't notice it before because the error only happens in development mode, not in production.

@wzhudev
Copy link
Member Author

wzhudev commented Nov 13, 2019

@Svetomechc Great! I will test it with my latest fix. Thank you very much.

@Svetomechc
Copy link
Contributor

@wendzhue no problem! I should be the one thanking you for maintaining this awesome library (:
It's only a pleasure to help you guys hunt down and squeeze some bugs.

@wzhudev
Copy link
Member Author

wzhudev commented Nov 14, 2019

image

It should be fixed in #4418.

@Svetomechc
Copy link
Contributor

@wendzhue thx! Looking forward to 8.5.1 :3

Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this pull request Apr 9, 2020
@hsuanxyz hsuanxyz mentioned this pull request Apr 15, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this pull request Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment