Skip to content

fix(account-chart): prevent scroll when clicking outside chart (@byseif21)#7608

Open
byseif21 wants to merge 2 commits intomonkeytypegame:masterfrom
byseif21:fix/chart-click-scroll
Open

fix(account-chart): prevent scroll when clicking outside chart (@byseif21)#7608
byseif21 wants to merge 2 commits intomonkeytypegame:masterfrom
byseif21:fix/chart-click-scroll

Conversation

@byseif21
Copy link
Contributor

@byseif21 byseif21 commented Mar 9, 2026

issue: clicking chart labels scrolls to a record

  • to reproduce
    1- account history chart under the filters.
    2- click on the “Words per Minute” or “Accuracy” labels on the sides of the chart.
    3- page scrolls to a record in the results table even if no chart dot was clicked.

Copilot AI review requested due to automatic review settings March 9, 2026 20:34
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Mar 9, 2026
@github-actions github-actions bot added the waiting for review Pull requests that require a review before continuing label Mar 9, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prevents unintended table scrolling when the account history chart is clicked in empty areas by gating the click behavior on having an active chart element.

Changes:

  • Only scroll/select a result row when the chart has an active tooltip element.
  • Add a guard around using accountHistoryActiveIndex.
  • Fix .resultRow[data-id=...] selector typo (missing closing ]).

@byseif21 byseif21 changed the title fix(account-chart): prevent scroll when clicking empty chart areas (@byseif21) fix(account-chart): prevent scroll when clicking outside chart (@byseif21) Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants