You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/06/24 00:20:54 UTC

[GitHub] [incubator-echarts] plainheart commented on a change in pull request #12781: fix(tooltip): tooltip should be hidden when mouse leaves tooltip content even if it is enterable, fix #12778.

plainheart commented on a change in pull request #12781:
URL: https://github.com/apache/incubator-echarts/pull/12781#discussion_r444577164



##########
File path: src/component/tooltip/TooltipContent.js
##########
@@ -218,12 +218,15 @@ function TooltipContent(container, api, opt) {
         }
     };
     el.onmouseleave = function () {
+        // fix #12778
+        // we should set `_inContent` before `hideLater`
+        self._inContent = false;
+
         if (self._enterable) {
             if (self._show) {
                 self.hideLater(self._hideDelay);

Review comment:
       It seems that we can remove the two judgements about `self._enterable` and `self._show`, `hideLater` will do it.
   
   https://github.com/apache/incubator-echarts/blob/9a2e192c7387663d83e753dc9b8a6c7683e22630/src/component/tooltip/TooltipContent.js#L312-L324
   
   What do you think of it?
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org