WebTextArea Can't select text

  1. 2 weeks ago

    Richard A

    Nov 30 Pre-Release Testers, Xojo Pro

    Can any one tell me how to make the WebTextArea allow copy with the mouse. You can do it with the arrow keys but not the mouse by dragging. I have an app that the users seem only to know how to hi-light and copy is by placing the cursor at the start point and click and drag across the text they want.

    This works for normal text fields. This problem has existed since web projects were possible.

    Thanks

  2. Greg O

    Nov 30 Xojo Inc
    Edited 2 weeks ago

    @RichardAlbrecht Can any one tell me how to make the WebTextArea allow copy with the mouse. You can do it with the arrow keys but not the mouse by dragging. I have an app that the users seem only to know how to hi-light and copy is by placing the cursor at the start point and click and drag across the text they want.

    This works for normal text fields. This problem has existed since web projects were possible.

    Thanks

    I'm having trouble reproducing this with a textarea dragged directly from the library

    https://www.dropbox.com/s/56eplj9bxe6lh6g/WebTextAreaSelection.mp4?raw=1

    Do you have code in any of the textarea's events which might be blocking the selection? or a sample that we can look at?

  3. Alberto D

    Nov 30 Pre-Release Testers, Xojo Pro

    I was able to select the text with the mouse (hi-light), macOS 10.12.6, Safari, Chrome and Firefox.

    What I can't do is right click the mouse to get the option there to Copy/Paste as I normally do on other webpages. But I can Copy/Paste using the app menu or the shortcut.

  4. Greg O

    Nov 30 Xojo Inc

    @Alberto D;Poo What I can't do is right click the mouse to get the option there to Copy/Paste as I normally do on other webpages. But I can Copy/Paste using the app menu or the shortcut.

    That's not surprising. The web framework overrides the built-in contextual menu so it can show its own.

  5. Alberto D

    Nov 30 Pre-Release Testers, Xojo Pro

    @Greg OLone That's not surprising. The web framework overrides the built-in contextual menu so it can show its own.

    It is surprising for me :)

    After working with desktop apps and get the built-in contextual menu if I don't use ConstructContextualMenu to build my own, I expected something like that on web too.

    There is no clipboard on web, I guess I can't create a contextual menu like the built-in one with Copy/Paste right?

  6. Tim P

    Nov 30 Pre-Release Testers feedback://46303

    @Alberto D;Poo I guess I can't create a contextual menu like the built-in one with Copy/Paste right?

    No, the web contextual menu is not an actual menu it's a DOM element created by Xojo.

  7. Richard A

    Nov 30 Pre-Release Testers, Xojo Pro

    The only thing I have in the events of the textarea is the double click:

    if me.Left = 10 and me.top = 115 then
    me.left = 10
    me.top = 8
    me.width = 877
    me.height = 522
    me.ZIndex = 100
    else
    me.left = 10
    me.top = 115
    me.width = 431
    me.height = 134
    me.ZIndex = 1
    end

  8. Greg O

    Nov 30 Xojo Inc

    Well we'll need to see a sample project then because I have no way to figure this out at this point.

  9. Richard A

    Nov 30 Pre-Release Testers, Xojo Pro

    I created a test with one window and it worked.

    The TextArea is in a Container control, there's no events on that except open.

    The problem is there are roughly 12 Container controls all the same size as the window, and stacked. Making them visible and invisible.

    The normal text fields work fine.

  10. Tim P

    Nov 30 Pre-Release Testers feedback://46303

    @RichardAlbrecht The problem is there are roughly 12 Container controls all the same size as the window, and stacked. Making them visible and invisible.

    Depending on what the DOM looks like, this may be the source of the problem.
    What browser / OS / version for both?

  11. Greg O

    Nov 30 Xojo Inc
    Edited 2 weeks ago

    @RichardAlbrecht The TextArea is in a Container control, there's no events on that except open.The problem is there are roughly 12 Container controls all the same size as the window, and stacked. Making them visible and invisible.

    Now see... those are important facts that you omitted from your original post. We might have been able to help a lot sooner with that info.

  12. Tobias B

    Dec 2 Pre-Release Testers, Xojo Pro Bern, Switzerland

    @Alberto D;Poo

    @Greg OLone That's not surprising. The web framework overrides the built-in contextual menu so it can show its own.

    It is surprising for me :)

    If you are interested in changing this, you may want to vote on Feedback Case #23071
    In Feedback Case #13742 the possibility to access to the client's clipboard is tracked, although this is seems to be unlikely to happen soon, given the current browser's support.

  13. last week

    Richard A

    Dec 3 Pre-Release Testers, Xojo Pro

    Ok guys, I've heard of DOM, but don't know anything about it.

    How do I tell, I poked around the Chrome Developer tools...

    Thanks

  14. Tim P

    Dec 3 Pre-Release Testers feedback://46303

    DOM stands for Document Object Model, or the objects on the webpage. If you have something overlapping the text area, even if it is not visible, it may be intercepting the text selection for the visible text area underneath it.

    You need to determine if the text area you're trying to select text from is underneath something.

  15. Richard A

    Dec 3 Pre-Release Testers, Xojo Pro

    OK you may have hit on something. The app has approximately 12 containers all on one window. I make them visible when the one is need. I though that was the best way to go as apposed to 12 separate windows.

    Is that why I have my problem.

  16. Richard A

    Dec 4 Pre-Release Testers, Xojo Pro

    Well I just created a test project with several container controls behind another with a text area and it worked as expected.

    So it's not that the containers are stacked, unless I'm missing something.

  17. Richard A

    Dec 4 Pre-Release Testers, Xojo Pro

    Alright just created a test with 2 containers, one large on top level and one smaller inside the one on top. Each has textarea.

    When the container on bottom is hidden you can select text normally but when the back ground is shown you cant select text as you would expect.

    I don't believe I have any containers visible on top of the text areas.

    I'm going to try messing with the zlindex.

  18. Richard A

    Dec 4 Pre-Release Testers, Xojo Pro

    Just tried setting the zindex to 100 and that did not solve problem.

or Sign Up to reply!