1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    2
    vikashbbd is on a distinguished road

      1  

    Default Unanswered: Copy Paste default Menu not coming in Text field & Textarea

    Unanswered: Copy Paste default Menu not coming in Text field & Textarea


    I have a sencha touch based mobile site and app. I am not getting android/iphone default context menu of copy / pasting when i tap on it for long time.


    Please suggest how can we do that.


    Thanks in advance

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Answers
    3500
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So you want to prevent the device from showing the copy/paste?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    2
    vikashbbd is on a distinguished road

      0  

    Default


    No,
    I want to show the devive's default context menu on long tap. Somehow its not coming in Sencha 2.2 but its there in sencha 2.0. I am not sure if its a bug or some extra config i need to pass.


    Here is the thing:

    ON long tap of textfield or textarea I should get the copy/paste menu. IF if the textbox is empty it should show paste option but its not coming.


    {
    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'
    }

    Thanks in advance

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    11
    Vote Rating
    2
    vikashbbd is on a distinguished road

      0  

    Default


    Please refer to below two links:

    http://try.sencha.com/touch/2.0.0/do....1/viewer.html


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

    O
    N android first one gives the android copy paste menu but second one does not. I am facing the smae problem in my live app also.

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Location
    Soviet Russia
    Posts
    16
    Vote Rating
    0
    lkjhgfdsa is on a distinguished road

      0  

    Default New example

    New example


    We have the same issue on iOS. But the above case work fine... Another test is banally the Kitchen sink.

    With ST until 2.2.0 User Interface -> Forms -> Toolbar Inputs search and text field let user double tap or longtap to show the native selection, copy and paste option (or the iOS mirror glass).
    The 2.2.1 kitchen sink disable anything except single tap. No select all, no copy, no paste, no mirror glass...

    Tested with iPad mini iOS 6.1, iPad2 iOS 5.1.
    With Android 4.1.2 works fine.

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    62
    Vote Rating
    5
    s.t.a.s is on a distinguished road

      0  

    Default Confirm

    Confirm


    Guys in Sencha, it's impossible to edit anything on iOS because of this bug. Cursor can be only on start of input and can't be positioned at the end. To edit user can only CLEAR all cantent in input control and RETYPE whole value.

  7. #7
    Sencha User
    Join Date
    Jan 2012
    Posts
    62
    Vote Rating
    5
    s.t.a.s is on a distinguished road

      1  

    Default Workaround

    Workaround


    I've found a workaround. You just need to add:
    Code:
    Ext.event.publisher.TouchGesture.prototype.isNotPreventable = /(?:)/;
    Forum thread: http://www.sencha.com/forum/showthread.php?265533-ST-2.2.1-Cannot-move-cursor-in-TextField-TextAreaField-in-iOS



  8. #8
    Sencha User efortes's Avatar
    Join Date
    Jun 2010
    Posts
    34
    Answers
    5
    Vote Rating
    2
    efortes is on a distinguished road

      1  

    Default


    This helped me allot. I added this to the launch function in app.js : Ext.event.publisher.TouchGesture.prototype.isNotPreventable = /^(select|a|input|textarea)$/i;

    I tested on android and it works. I still have to do a big test on the iPhone.