1. #1
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default Unanswered: Copy text from internal div of List

    Unanswered: Copy text from internal div of List


    Hi,

    I have a List component and I need to be able to copy text from its internal elements. The List is just read only simple view and it doesn't need any selection abilities. Currently there is no possibility to copy, I think it relates to to List row selection that takes the click event. I tried to disable selection mechanism but with no success.

    Please suggest how to solve...

    10x

  2. #2
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    579
    Answers
    34
    Vote Rating
    32
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default Data Element

    Data Element


    if you need the full text you may take it from the data element.
    On click you receive the index and you may use the index on the data element for the text.

  3. #3
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default


    Thanks for response!
    But this is not good enough, I want to allow regular copy/paste feature...

  4. #4
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    579
    Answers
    34
    Vote Rating
    32
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default Please explain

    Please explain


    Please explain what you want to do a bit more in detail.

    What I understand is, that you want to copy text from one listitem into another listitem.
    Or is it from list into a form?

    Please be more specific

  5. #5
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default


    I want to allow copy from list element to clipboard of device, allow the user to re-use the text

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    579
    Answers
    34
    Vote Rating
    32
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default How to put data in list

    How to put data in list


    But how do you put the data in the list.

    Are you using a store to fill the list, or are you using a json?

    How will the user tell you that he wants to get the data. Is he clicking on the list item, do you have a button per list item with the copy feature...

  7. #7
    Ext GWT Premium Member
    Join Date
    Sep 2011
    Posts
    25
    Vote Rating
    -1
    alona.oz has a little shameless behaviour in the past

      0  

    Default


    I use store to fill the List. User will click long click and copy/paste panel of device (not mine) will open. He will copy in regular way (in Android system he will select using text selection Android tool, in Chrome run from desktop he will hold left mouse button and drag to select), and paste in any other place at device.

    Is this possible?

    10x

  8. #8
    Sencha User
    Join Date
    Sep 2012
    Posts
    65
    Answers
    7
    Vote Rating
    1
    warrean is on a distinguished road

      0  

    Default


    @Alona.oz

    Perhaps you can use a <input type="text"> component in your Lists itemTpl-configuration ?

    I haven't tested this but I think users can select and copy paste text like this.

  9. #9
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    579
    Answers
    34
    Vote Rating
    32
    Kurt001 has a spectacular aura about Kurt001 has a spectacular aura about

      0  

    Default


    warren is right.
    You might use a disabled inputfield and still listen to the tap event. On tapstart you could enable the input field to allow copying and the disable it again.

  10. #10
    Sencha User
    Join Date
    Mar 2011
    Posts
    83
    Answers
    16
    Vote Rating
    11
    Schildi will become famous soon enough

      0  

    Default


    The reason for not being able to mark the text from the list items is, that they have the CSS-property
    Code:
    -webkit-user-select
    is set to "none".
    Maybe you can try to override this property in your own CSS-class and add it to your list's items.
    You should try
    Code:
    -webkit-user-select: auto !important;
    or
    Code:
    -webkit-user-select: text !important;
    Don't know whether this works, I didn't test it

    Best regards,
    Schildi