Skip to content

Fix hover positioning with CSS zoom - #12343

Open
SasmitNarnaware wants to merge 1 commit into
chartjs:masterfrom
SasmitNarnaware:fix/css-zoom-hover-position
Open

SasmitNarnaware wants to merge 1 commit into
chartjs:masterfrom
SasmitNarnaware:fix/css-zoom-hover-position

Conversation

@SasmitNarnaware

Copy link
Copy Markdown

Summary

Fixes incorrect hover and tooltip positioning when a chart's canvas or ancestor is scaled using the CSS zoom property.

Changes

Normalize pointer coordinates to account for CSS zoom in getCanvasPosition.
Add three regression tests covering CSS zoom-related interaction behavior.

Testing

Regression tests: verified to fail before the fix and pass after it.

Helpers test suite: 443 successful tests across Chrome and Firefox, with one Firefox test skipped because the environment does not expose the Touch constructor.

JavaScript lint: zero errors; warnings match the existing baseline.

Full test suite: some pre-existing fixture and Firefox environment-related failures remain; see the investigation report for details.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant