gajus / gajus/swing

Unable to preventDefault inside passive event listener due to target being treated as passive.

Open
#97 0 comments 4 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
2.6k
Forks
246
PR merge metrics
No merged PRs in 30d

Description

I am getting this warning in Chrome when I drag a card.

> Unable to preventDefault inside passive event listener due to target being treated as passive

It comes from this line, in Card.js

```
global.addEventListener('touchmove', function (event) {
if (dragging) {
event.preventDefault();
}
});
```
Anyway to remove the warning? More info about this chrome warning [here](https://www.chromestatus.com/features/5093566007214080)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Card.js at the global touchmove listener shown in the issue and review how its event-listener options affect preventDefault in Chrome. Reproduce the card drag warning, then verify that the warning is gone while dragging still prevents the unwanted touch behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.