ui.TextArea = Ext.extend(Ext.form.TextArea, !Ext.is.iOS ? {} : {
lastY: undefined,
lastPos: {},
handleTouch: function (e) { this.lastY = e.pageY; },
handleMove: function (e) {
var textArea = e.target;
var top = textArea.scrollTop <= 0;
var bottom = textArea.scrollTop + textArea.clientHeight >= textArea.scrollHeight;
var up = e.pageY > this.lastY;
var down = e.pageY < this.lastY;

this.lastY = e.pageY;

// default (mobile safari) action when dragging past the top or bottom of a scrollable
// textarea is to scroll the containing div, so prevent that.
if ((top && up) || (bottom && down)) {
e.preventDefault();
e.stopPropagation(); // this tops scroll going to parent
}


// Sencha disables textarea scrolling on iOS by default,
// so stop propagating the event to delegate to iOS.
if (!(top && bottom)) {
e.stopPropagation(); // this tops scroll going to parent
}
},

resizeTexteare: function () {
var elts = Ext.query('#mytextarea');

// Get the width of the element
var width = Ext.get(id).dom.scrollWidth

// Split the user input based on the line break
var lines = Ext.getCmp(id).getValue().split('\n');

// in 100px you put around 14 digits, so using a simple rule of 3 to find out the max width of the line
// TODO : adapt to font-size
var max = 14 * width / 100;


// For each line, compute the nombre of lines occupied
var nb_lines_area = 0;
for (var i = 0; i < lines.length; i++) {
nb_lines_area++; // because we jump a line

// The line exceed the max width
if (lines[i].length > max) {
nb_lines_area += Math.floor(lines[i].length / max);
}
}




// Modify the height of the textarea, knowing that a line is about 20px
// TODO : adapt to font-size
var height = 20 * nb_lines_area;


// My textarea is at least 90px long
if (height > 90)
Ext.getCmp(id).setHeight(height + 'px');
},
initEvents: function () {
// var textArea = this.element.select('textarea').elements[0]; // Note: this.getInput() should be the method, but doesn't exist for some reason
var textArea = this.fieldEl.dom;


// have to add these events directly to the DOM textarea (as opposed to this.fieldEl.on),
// otherwise they're handled after Ext.gesture.Manager and preventDefault will already have been called.
textArea.addEventListener(
Ext.supports.Touch ? 'touchstart' : 'mousedown',
Ext.createDelegate(this.handleTouch, this),
false);


textArea.addEventListener(
Ext.supports.Touch ? 'touchmove' : 'mousemove',
Ext.createDelegate(this.handleMove, this),
false);




//this.original.initialize.apply(this, arguments);
}
});
Ext.reg('c_textareafield', ui.TextArea);

issue1: Can not get the focus,It looks readonly.
issue2: can not scroll.