【发布时间】:2016-03-22 13:42:07
【问题描述】:
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 。但是用键盘隐藏文本区域
【问题讨论】:
-
如果后面有足够多的元素,你可以尝试使用 list.getScrollable().getScroller().scrollTo(Element)。
-
我试过了,但是会产生跳跃效果@ProtoBassi
-
对焦前你试穿了吗
-
if (iNewHeight > 0) { textAreaEl.dom.style.height = textAreaEl.dom.scrollHeight + "px"; this.getParent().getParent().getScrollable().getScroller().scrollTo(0, iNewHeight); }
-
以前我是这样尝试的
标签: android keyboard sencha-touch sencha-touch-2