anvaka / anvaka/wheel

removeWheelListener does not remove listener on IE11

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

Description

so here is my code in react (works in all browsers except IE11)
```
lifecycle({
componentDidMount() {
const { onScroll, onSwipe, id } = this.props
addWheelListener(window, onScroll)
const swipe = new ZingTouch.Swipe()
const region = ZingTouch.Region(
document.getElementById(id),
false,
false
)
region.bind(document.getElementById(id), swipe, onSwipe)
},
componentWillUnmount() {
const { onScroll, id } = this.props
removeWheelListener(window, onScroll)
const region = ZingTouch.Region(document.getElementById(id))
region.unbind(document.getElementById(id))
},
}),
```

My onScroll function still fires after I remove

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the removeWheelListener entry point and reproduce the reported React lifecycle case in IE11 or its compatibility environment. Verify that the onScroll callback no longer fires after componentWillUnmount removes the listener; no source file or test is named in the issue.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.