@glitchr/stickyjs 1.0.13 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/js/sticky.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/stickyjs",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Sticky scroll library",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/js/sticky.js CHANGED
@@ -1552,6 +1552,7 @@ $.fn.serializeObject = function () {
1552
1552
  // Mouse events
1553
1553
  if (mouseAction) {
1554
1554
 
1555
+ $(scroller).off("mouseenter.autoscroll touchstart.autoscroll");
1555
1556
  $(scroller).on("mouseenter.autoscroll touchstart.autoscroll", function() {
1556
1557
 
1557
1558
  if(autoscrollTimeout != undefined) clearTimeout(autoscrollTimeout);
@@ -1559,6 +1560,7 @@ $.fn.serializeObject = function () {
1559
1560
  $(scroller).stop();
1560
1561
  });
1561
1562
 
1563
+ $(scroller).on("mouseleave.autoscroll touchend.autoscroll");
1562
1564
  $(scroller).on("mouseleave.autoscroll touchend.autoscroll", function() {
1563
1565
 
1564
1566
  if(startOver) payloadAutoscroll();
@@ -1569,6 +1571,7 @@ $.fn.serializeObject = function () {
1569
1571
  }
1570
1572
  });
1571
1573
 
1574
+ $(scroller).on("onbeforeunload.autoscroll");
1572
1575
  $(scroller).on("onbeforeunload.autoscroll", function() {
1573
1576
 
1574
1577
  $(this).off("mousewheel.autoscroll touchstart.autoscroll");
@@ -1590,6 +1593,7 @@ $.fn.serializeObject = function () {
1590
1593
  var scrollWidth = $(scroller).prop('scrollWidth') - scroller.innerWidth();
1591
1594
  var scrollHeight = $(scroller).prop('scrollHeight') - scroller.innerHeight();
1592
1595
 
1596
+ $(scroller).off("wheel.autoscroll DOMMouseScroll.autoscroll mousewheel.autoscroll touchstart.autoscroll");
1593
1597
  $(scroller).on("wheel.autoscroll DOMMouseScroll.autoscroll mousewheel.autoscroll touchstart.autoscroll", function(e) {
1594
1598
 
1595
1599
  $(this).prop("user-scroll", true);