键盘显示在sencha触摸中iframe的位置



我使用的是cordova 1.8和sencha touch 2.2.1。我的问题是,当我点击文本字段时,它显示的是键盘而不是iframe。

这是我的sencha代码:

onfocus : function(){
Ext.getCmp('toolid').hide();
Ext.getCmp('crperid').hide();
Ext.getCmp('eventcvideoid').hide();
    Ext.getCmp('sqlbacklbl').show();
         //   Ext.getCmp('dattimepanelid').setHtml('<iframe id="dtid" src="http://example.com</iframe>');
      // frame.contentWindow.scrollTo(0, 1000); 
      Ext.getCmp('dattimepanelid').show();

使用此代码隐藏键盘

var activeElement = document.activeElement;
activeElement.setAttribute('readonly', 'readonly'); // Force keyboard to hide on input field.
activeElement.setAttribute('disabled', 'true'); // Force keyboard to hide on textarea field.
Ext.defer(function() {
activeElement.blur();
        // Remove readonly attribute after keyboard is hidden.
activeElement.removeAttribute('readonly');
activeElement.removeAttribute('disabled');
   if(callback) {
     callback.call(scope);
 }
}, 100);

最新更新