Skip to content

fix(toolbox): clear global cursor on restore. close #21644#21669

Open
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-21644-datazoom-restore-cursor
Open

fix(toolbox): clear global cursor on restore. close #21644#21669
rahul37wallst-sudo wants to merge 1 commit into
apache:masterfrom
rahul37wallst-sudo:investigate-21644-datazoom-restore-cursor

Conversation

@rahul37wallst-sudo

@rahul37wallst-sudo rahul37wallst-sudo commented Jul 1, 2026

Copy link
Copy Markdown

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

Reset the active toolbox dataZoom selection cursor when toolbox restore is clicked.

Fixed issues

Details

Before: What was the problem?

After activating toolbox dataZoom selection and then clicking toolbox restore, the chart data range was restored, but the dataZoom selection cursor/brush state could remain active.

This left the chart in the zoom selection interaction mode after restore.

After: How does it behave after the fixing?

Toolbox restore now releases the global cursor before dispatching the restore action.

This disables the active dataZoom select brush state, restores the toolbox zoom icon to normal, and prevents the stale zoom selection cursor from remaining active after restore.

A unit test was added for the toolbox dataZoom restore path.

Document Info

One of the following should be checked.

  • This PR doesn't relate to document changes
  • The document should be updated later
  • The document changes have been made in apache/echarts-doc#xxx

Misc

Security Checking

  • This PR uses security-sensitive Web APIs.

ZRender Changes

  • This PR depends on ZRender changes (ecomfe/zrender#xxx).

Related test cases or examples to use the new APIs

test/ut/spec/component/toolbox/DataZoom.test.ts

Merging options

  • Please squash the commits into a single one when merging.

Other information

Validation run:

  • npx jest --config test/ut/jest.config.cjs --coverage=false test/ut/spec/component/toolbox/DataZoom.test.ts --runInBand
  • npx eslint src/component/toolbox/feature/Restore.ts test/ut/spec/component/toolbox/DataZoom.test.ts
  • git diff --check
  • npm run checktype

@echarts-bot

echarts-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

Please DO NOT commit the files in dist, i18n, and ssr/client/dist folders in a non-release pull request. These folders are for release use only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant