From 89133062b10d39c94a0f86e6b0da0d262ce14de6 Mon Sep 17 00:00:00 2001 From: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com> Date: Mon, 25 May 2026 10:31:01 +0300 Subject: [PATCH] T1328375 - Web Dashboard: "Uncaught TypeError: Cannot read properties of null (reading 'hide')" error is thrown on attempt to scroll above the Bar column (#33686) Signed-off-by: Dmitry Lavrinovich <52966626+dmlvr@users.noreply.github.com> Co-authored-by: Andrei Kharitonov --- .../viz/sparklines/base_sparkline.ts | 1 + .../baseSparklineTooltipEvents.tests.js | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/packages/devextreme/js/__internal/viz/sparklines/base_sparkline.ts b/packages/devextreme/js/__internal/viz/sparklines/base_sparkline.ts index 006189610986..1cddaca89ae5 100644 --- a/packages/devextreme/js/__internal/viz/sparklines/base_sparkline.ts +++ b/packages/devextreme/js/__internal/viz/sparklines/base_sparkline.ts @@ -275,6 +275,7 @@ const _disposeTooltip = BaseSparkline.prototype._disposeTooltip; BaseSparkline.prototype._disposeTooltip = function () { if (this._tooltip) { _disposeTooltip.apply(this, arguments); + this._tooltipShown = false; } }; BaseSparkline.prototype._setTooltipRendererOptions = function () { diff --git a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js index 0fddab370329..6eaa14b4626b 100644 --- a/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js +++ b/packages/devextreme/testing/tests/DevExpress.viz.sparklines/baseSparklineTooltipEvents.tests.js @@ -149,3 +149,31 @@ QUnit.test('Tooltip should not hide if in the canvas with margins', function(ass assert.strictEqual(tooltipShown.callCount, 1); assert.strictEqual(tooltipHidden.callCount, 0); }); + +QUnit.test('No errors after dispose and manual _hideTooltip call (T1328375)', function(assert) { + const bullet = this.createWidget({ + startScaleValue: 0, + endScaleValue: 35, + value: 20, + tooltip: { + enabled: true + } + }); + + const consoleErrorStub = sinon.stub(console, 'error'); + let caughtError; + + bullet._showTooltip(); + bullet.dispose(); + + try { + bullet._hideTooltip(); + } catch(error) { + caughtError = error; + } finally { + consoleErrorStub.restore(); + } + + assert.strictEqual(caughtError, undefined, '_hideTooltip should not throw after dispose'); + assert.strictEqual(consoleErrorStub.callCount, 0, 'console should not contain runtime errors'); +});