schovi / react-iscroll

React component for wrapping iScroll http://iscrolljs.com/
MIT License
236 stars 60 forks source link

While scrolling, if the mouse gets released outside of the frame the state remains pressed #41

Closed zeachco closed 7 years ago

zeachco commented 7 years ago

I know this is more likely a browser issue but this is a nice improvment that could be acheived: could we reset the state or retest the mouse down states when mouse is out of the content?

you can reproduce on https://codepen.io/jakob-e/pen/wBmgYb by clicking the content to scroll and release mouse in the editor area since the preview is in a iframe

maybe somthing using code such as

document.body.addEventListener('mouseleave', function() {
  alert('left body we must recalculate on next mousemove if we still press the mouse button');
})

would help fixing this

schovi commented 7 years ago

@zeachco This si issue for original scroll library https://github.com/cubiq/iscroll

zeachco commented 7 years ago

Thanks for redirecting