BoxFactura / pulltorefresh.js

A quick and powerful plugin for your pull-to-refresh needs in your webapp.
http://bxf.mx/pulltorefresh.js/
MIT License
3.97k stars 278 forks source link

Closing directly after pull to refresh #86

Closed Kenji94 closed 4 years ago

Kenji94 commented 4 years ago

Bug report

Current behavior: Hi, Thanks for your lib but i have a bug. ~1 refresh on 4 is closing directly after pull to refresh (is not using the timeout ?) Console error explains that the (handler.classPrefix) + "refresh") is not found from: function onReset(handler) { handler.ptrElement.classList.remove(((handler.classPrefix) + "refresh")); handler.ptrElement.style[handler.cssProp] = '0px'; ... } I modified your code to add a catch for the error but the result is the same. Do you know how could this happen ?

Expected behavior: Scroll should always use timeout before closing.

JSFiddle URL for demo with bug: I'm using the demo code.

Browsers affected: Chrome v79

pateketrueke commented 4 years ago

Please use a jsfiddle to reproduce the bug, otherwise is hard for us to understand it properly, thank you!

faelsoto commented 4 years ago

Closing it because it doesn't include demo.

Mazvy commented 3 years ago

Can confirm this behavior.

Intermittently the pull to refresh action results in the ptr element getting removed from DOM (does not hide gracefully with an animation sliding up) and as a result doesn't show "Refreshing" although the refresh command onRefresh() fires and no error is presented in the console. Usually trying again results in it working as expected although sometimes it still bugs out. Also sometimes for a split second the PTR text seems to jump down ~100px when glitching out. This happens in Chrome on desktop and mobile.

I find it hard to reproduce, frantic scrolling with touch sometimes gets it to break.