davidaurelio / TouchScroll

TouchScroll is a JavaScript- and CSS 3-based scroller for devices using Webkit Mobile. It is meant to mimic “native” scrolling feeling and behavior as much as possible.
http://uxebu.com/blog/2010/04/27/touchscroll-a-scrolling-layer-for-webkit-mobile/
BSD 2-Clause "Simplified" License
474 stars 61 forks source link

Inputs inside an iframe where TouchScroll is used freeze input elements #27

Open robertpate opened 12 years ago

robertpate commented 12 years ago

If a page using TouchScroll is loaded inside an iframe and the page has inputs, the input's key entry is unresponsive when a user moves the cursor in the input box using a touch, hold, move the cursor, and release. After that action, no keyboard entries are registered in the input even though the cursor is available and the input is considered active.

mariob316 commented 12 years ago

In the touchscroll js, add this to the onTouchStart function in the if statment

var target = a.target; while (target.nodeType !== 1){ target = target.parentNode; } if (target.tagName !== 'INPUT' && target.tagName !== 'SELECT'){ a.preventDefault(); }