azoff / overscroll

Touch scrolling for the browser
http://azoff.github.io/overscroll
414 stars 82 forks source link

Cancelling scrolling when an INPUT element has the focus #103

Open paulhickman opened 11 years ago

paulhickman commented 11 years ago

If there are input elements that are children of the scrolling area, you should cancel the overflow scrolling, particularly for HTML range elements.

I added the following to start() to achieve this but there may be a better solution

// stop any drifts flags.drifting = false;

// allow input focus if (event.target.tagName=="INPUT" || event.target.tagName=="TEXTAREA") { return; }

azoff commented 10 years ago

Overscroll is already doing this; are you using the most up-to-date version?

Here is what overscroll cancels on: https://github.com/azoff/Overscroll/blob/master/src/jquery.overscroll.js#L146

Here is the implementation point (in start): https://github.com/azoff/Overscroll/blob/master/src/jquery.overscroll.js#L451