gajus / gajus/pan

Selecting multipe Node Elements

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I have a problem when:

```
const taskItems = document.querySelectorAll('.task-item');
Array.from(taskItems).forEach(item => {
pan = new Pan(item);
}
```

...i get:
Uncaught TypeError: Cannot read properties of undefined (reading 'update') at HTMLBodyElement.dragMove (pan.js:143:38)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the error by creating a Pan instance for each element returned by document.querySelectorAll('.task-item'). Start in pan.js at dragMove, line 143, and trace why update is read from undefined during the shared body drag handler. Done means dragging any of the selected elements no longer throws this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.