2013-07-06 42 views
0

我有sencha touch 2基於的應用程序,並且在點擊和按住時遇到問題。理想情況下,我應該得到android複製粘貼的上下文菜單,但我沒有。Sencha Touch 2 - Android上的文本輸入

請參閱以下兩個鏈接。

http://try.sencha.com/touch/2.0.0/docs/Ext.field.TextArea.1/viewer.html

http://try.sencha.com/touch/2.2.0/docs/Ext.field.TextArea.1/viewer.html

Android上的第一個給出的Android(iOS上未測試)複製粘貼菜單,但第二個沒有。我在我的現場應用程序中也遇到了smae問題。

請建議,如果任何解決方案

+0

您正在使用哪個版本的Sencha? 2.0.0或2.2.0? – bwags

+0

2.2 ..這是最新的可用 –

+0

你能發佈你的代碼嗎? – bwags

回答

0

回覆#bwags:

Ext.define('HCMDoctor.view.PFQuestion', { 
extend : 'Ext.form.Panel', 
xtype : 'PFQuestion', 
id : 'pfView', 
config : { 
    layout : { 
     type : 'auto', 
     align : 'stretch' 
    }, 
    flex : 1, 
    scrollable : 'vertical', 
    items : [{ 
       xtype : 'container', 
       html : 'Click below to choose a different community', 
       style : { 
        width : '98%', 
        marginLeft : '5px', 
        marginTop : '10px', 
        fontSize : '10px' 

       } 
      }, { 
       xtype : 'selectfield', 
       store : 'CommunityWiseQuestions', 
       name : 'pfCommId', 
       id : 'pfCommId', 
       valueField : 'communityId', 
       displayField : 'displayFull', 
       centered : false, 
       usePicker : false, 
       defaultTabletPickerConfig : { 
        height : 400, 
        minHeight : 400, 
        width : 300, 
        minWidth : 300 
       }, 
       style : { 
        marginTop : '10px', 
        marginBottom : '10px', 
        width : '96%', 
        marginLeft : '5px', 
        fontSize : '12px', 
        border : '1px solid #000' 
       } 
      }, { 
       html : '', 
       id : 'questionMessageDiv', 
       style : { 
        textAlign : 'center', 
        width : '100%' 
       } 
      }, { 
       xtype : 'panel', 
       id : 'pfQuestionHolder', 
       style : { 
        width : '98%', 
        marginLeft : '5px', 
        marginBottom : '10px' 
       }, 
       tpl : [ 
         '<span style="font-size:12px;"><b>{discussionTitle}</b><br>{description}', 
         // '<br><i><span style="color:green">Posted in 
         // <b>{postedInCommunityName}</b></span></i>', 
         '</span>'] 
      }, { 
       xtype : 'hiddenfield', 
       id : 'pfQuestionId', 
       name : 'pfQuestionId' 

      }, { 
       xtype : 'textareafield', 
       id : 'pfAnswer', 
       name : 'pfAnswer', 
       placeHolder : 'Please write your answer here...', 
       style : { 
        marginBottom : '10px', 
        width : '97%', 
        marginLeft : '5px', 
        fontSize : '12px', 
        border : '2px solid #000' 
       } 
       , 
       listeners : { 
        focus : function(comp, e, eopts) { 
         listeners : { 
          var ost = comp.element.dom.offsetTop; 
          this.getParent().getScrollable().getScroller() 
            .scrollToEnd(true); 
          return true; 
         } 
        } 
       } 
      }, { 
       xtype : 'button', 
       text : 'Submit', 
       id : 'submitPFQuestion', 
       ui : 'confirm' 
      }, { 
       xtype : 'spacer', 
       height : 10 

      }, { 
       xtype : 'container', 
       html : '<a id="ignorePFQuestion" href="javascript:">Skip and Show Next Question</a>', 
       style : { 
        width : '98%', 
        marginLeft : '5px', 
        textAlign : 'center', 
        marginBottom : '80px' 
       } 
      } 

    ] 

}, 
initialize : function() { 
    this.element.on({ 
       scope : this, 
       tap : this.ignorePremiumQuestion, 
       delegate : '#ignorePFQuestion' 
      }); 

    return this.callParent(); 
}, 
ignorePremiumQuestion : function(obj, newValue, oldValue, eOpts) { 
    HCMDoctor.app.getController('Main').showPFQuestionNext(); 
} 

});

這是我的觀點之一。我沒有得到在android以及ios上覆制粘貼的默認上下文菜單。

事實上sencha嘗試URL不會產生複製粘貼菜單。