react-scroll
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -0,1 +1,3 @@ | ||
var addPassiveEventListener = require('./passive-event-listeners'); | ||
var events = ['mousedown', 'mousewheel', 'touchmove', 'keydown'] | ||
@@ -10,5 +12,5 @@ | ||
for(var i = 0; i < events.length; i = i + 1) { | ||
document.addEventListener(events[i], cancelEvent); | ||
addPassiveEventListener(document, events[i], cancelEvent); | ||
} | ||
} | ||
}; |
@@ -0,1 +1,3 @@ | ||
var addPassiveEventListener = require('./passive-event-listeners'); | ||
var eventThrottler = function(eventHandler) { | ||
@@ -28,3 +30,3 @@ var eventHandlerTimeout; | ||
this.scrollSpyContainers.push(scrollSpyContainer); | ||
scrollSpyContainer.addEventListener('scroll', eventHandler); | ||
addPassiveEventListener(scrollSpyContainer, 'scroll', eventHandler); | ||
} | ||
@@ -31,0 +33,0 @@ }, |
{ | ||
"name": "react-scroll", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "A scroll component for React.js", | ||
@@ -5,0 +5,0 @@ "main": "lib", |
@@ -306,2 +306,5 @@ ## React Scroll | ||
> v1.2.0 | ||
- Now using passive event listeners. | ||
> v1.1.0 | ||
@@ -308,0 +311,0 @@ - now possible to set initial active link on componentDidMount ( see README or examples code ) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39858
21
915
336