Skip to content

Type error if to click at the very beginning of the scrollbar with lots of items #723

Closed
@MKrutii

Description

@MKrutii

Noticed an issue that cause error in the console/rollbar

screen_2 screen_1

Expected Behavior

No errors in the console

Current Behavior

TypeError: Cannot read properties of undefined (reading '0')
    at t.getTouchY (Scrollbar.js:572:9)
    at Scrollbar.js:374:16
    at Object.Va (react-dom.production.min.js:52:317)
    at Za (react-dom.production.min.js:52:471)
    at react-dom.production.min.js:53:35
    at Ao (react-dom.production.min.js:100:68)
    at Co (react-dom.production.min.js:101:380)
    at react-dom.production.min.js:113:65
    at Ra (react-dom.production.min.js:292:189)
    at react-dom.production.min.js:50:57 

Possible Solution

For some reason targetTouches is undefined, the logic might be improved to have the optional chaining or other solution

Steps to Reproduce (for bugs)

Can be reproducible in the examples page

  • Have the table with the lots of items
  • Have the vertical/horizontal scrollbar
  • Click to the very beginning of the scrollbar
  • Observe the error in console

Your Environment

  • Browser Name and version: MS Edge latest / Chrome latest
  • Operating System and version (desktop or mobile): Win 11 x64

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions