constructor: function() {
this.adjustHeight = Ext.Function.createBuffered(function(textarea) {
var textAreaEl = textarea.getComponent().input;
if (textAreaEl) {
textAreaEl.dom.style.height = 'auto';
var iNewHeight = textAreaEl.dom.scrollHeight;
if (iNewHeight > 0) {
textAreaEl.dom.style.height = textAreaEl.dom.scrollHeight + "px";
}
}
},200,this);
this.callParent(arguments);
}
我希望textarea
专注于完整内容visible
。但是用键盘隐藏的文本区域
答案 0 :(得分:0)
尝试使用滚动来使用onBeforeFocus事件:
scrollableView.scrollTo(textfield.element.getXY()[0],textfield.element.getXY()[1]);
现在你可能希望对所有textfields和textareafields执行此操作,以便用户在所有项目上获得相同的内容。
确保效果早于键盘动画或延迟约175毫秒。
Ext.defer(function() {###your code goes here###}, 175, this);