0
votes

I have sencha touch 2 based app and I have facing issue while tapping and holding. Ideally i should get android context menu of copy paste but i dont.

Please refer to below two links.

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

On android first one gives the android (not tested on ios) copy paste menu but second one does not. I am facing the smae problem in my live app also.

Please suggest if any solution

1
Which version of Sencha are you using? 2.0.0 or 2.2.0?bwags
2.2.. This is the latest availableVikash Agrawal
Can you post your code?bwags
I have posted the code below... I was not able to post it in comment.Vikash Agrawal

1 Answers

0
votes

Reply to #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();
}

});

This is one of the views I have. I am not getting the default context menu of copy paste on android as well as ios.

Infact the sencha try URL doesnot produce copy paste menus.