fix(tooltip): fix alwaysShowContent doesn't work after leaving the tooltip#18221
fix(tooltip): fix alwaysShowContent doesn't work after leaving the tooltip#18221Ovilia merged 4 commits intoapache:masterfrom jianghr-rr:fix-18111
alwaysShowContent doesn't work after leaving the tooltip#18221Conversation
|
Thanks for your contribution! |
Ovilia
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
I think TooltipRichContent should also make similar changes. And the manuallyHideTip in TooltipView should remove the checking of !this._alwaysShowContent since we've done the checking in hideLater. And thus this._alwaysShowContent variable may probably be needed in TooltipView any more.
Please also add a test case for this PR.
|
|
||
| if (self._enterable) { | ||
| if (self._show) { | ||
| if (self._show && !self._alwaysShowContent) { |
There was a problem hiding this comment.
I think it's more robust to check this in hideLater rather than onmouseleave because when other reasons triggers hiding, this should also be checked.
Ovilia
left a comment
There was a problem hiding this comment.
Looks good to me other than some unnecessary comments.
src/component/tooltip/TooltipView.ts
Outdated
| private _api: ExtensionAPI; | ||
|
|
||
| private _alwaysShowContent: boolean; | ||
| // private _alwaysShowContent: boolean; |
src/component/tooltip/TooltipView.ts
Outdated
| * @type {boolean} | ||
| */ | ||
| this._alwaysShowContent = tooltipModel.get('alwaysShowContent'); | ||
| // this._alwaysShowContent = tooltipModel.get('alwaysShowContent'); |
Ovilia
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
|
Congratulations! Your PR has been merged. Thanks for your contribution! 👍 |
alwaysShowContent doesn't work after leaving the tooltip
…tooltip . close #18111
Brief Information
This pull request is in the type of:
What does this PR do?
Fixed issues
Details
Before: What was the problem?
After: How does it behave after the fixing?
Document Info
One of the following should be checked.
Misc
ZRender Changes
Related test cases or examples to use the new APIs
N.A.
Others
Merging options
Other information