When I have anchors in a scrollable div, tapping on it causes the div do scroll down 1px if its on top. This causes iOS to register a change after tap and initializes a pause until re-tap. This is a behavior of iOS to allow drop downs and the like to function.
utils.scrollToEnd = function (el) {
var curPos = el.scrollTop, height = el.offsetHeight, scroll = el.scrollHeight;
// If at top, bump down 1px
if (curPos <= 0) {
el.scrollTop = 1; // <<<<< HERE
}
// If at bottom, bump up 1px
if (curPos + height >= scroll) {
el.scrollTop = scroll - height - 1;
}
};
When I have anchors in a scrollable div, tapping on it causes the div do scroll down 1px if its on top. This causes iOS to register a change after tap and initializes a pause until re-tap. This is a behavior of iOS to allow drop downs and the like to function.