Workaround to restore iOS native textarea scrolling in Sencha 1.1
Here's a simple workaround to restore iOS native textarea scrolling in Sencha 1.1. The only requirement is that you set the 'useMask' config of your textarea to 'false' so that mouse events reach the actual textarea element. Don't use 'scroll' with this, that wraps the textarea in a scrollable div. Use 'maxRows' to set the number of lines you want to show.
The bad guy here is Ext.gesture.Manager, which contains the following snippet:
Code:
onTouchMove: function(e) {
if (!Ext.is.Android) {
e.preventDefault();
}
The solution is to intercept the event before it hits that and fine-tune the conditions under which the default behaviour is changed. 'Ext.overrideOriginal' is just an extension to Ext.override which I find useful.