From 614c8c3abeff51d72f1e68167387339d40f10de5 Mon Sep 17 00:00:00 2001 From: tuanaiseo Date: Wed, 8 Apr 2026 06:19:49 +0700 Subject: [PATCH] refactor(api.tooltip.ts): inconsistent callback context for tooltip hide han `tooltip.show` invokes `tooltip_onshow` with `this` bound to the internal chart object (`$$`), but `tooltip.hide` invokes `tooltip_onhide` with `this` bound to the public chart instance. This inconsistency can break user callbacks that rely on a stable context and internal fields. Affected files: api.tooltip.ts Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com> --- src/api.tooltip.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.tooltip.ts b/src/api.tooltip.ts index e87d9e79a..4ee7e1d78 100644 --- a/src/api.tooltip.ts +++ b/src/api.tooltip.ts @@ -36,5 +36,5 @@ Chart.prototype.tooltip.hide = function() { // TODO: get target data by checking the state of focus this.internal.dispatchEvent('mouseout', 0) - this.internal.config.tooltip_onhide.call(this) + this.internal.config.tooltip_onhide.call(this.internal) }