Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 51
Registered: ‎06-13-2011
My Device: Bold 9900, PlayBook 64GB, Dev Alpha
My Carrier: Bell Mobility
Accepted Solution

Making text selectable in WebWorks App

I created a PlayBook app using WebWorks, HTML, and CSS and the app features a large HTML textarea. For some reason the user cannot select text to copy it, or paste text into it.

 

Is there anything special that need to be done to enable text selection? I checked my code and don't see anything prohibiting text selection.

 

Thanks for any advice.

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Making text selectable in WebWorks App

AFAIK, it's not possible to select text in a webworks app.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Highlighted
Regular Contributor
Posts: 97
Registered: ‎06-16-2009
My Device: Not Specified

Re: Making text selectable in WebWorks App

Smiley Sad I can't believe it this could come so handy... 

Developer
Posts: 51
Registered: ‎06-13-2011
My Device: Bold 9900, PlayBook 64GB, Dev Alpha
My Carrier: Bell Mobility

Re: Making text selectable in WebWorks App

I have tracked down the solution (thanks to the geniuses behind the PlayBook app Glimpse). Check it out here: http://www.willw.net/enabling-copy-and-paste-in-a-webworks-app-for-the-blackberry-playbook/

Such a simple solution I was kicking myself for not figuring it out sooner!
Contributor
Posts: 41
Registered: ‎07-21-2011
My Device: Superberry
My Carrier: Rogers

Re: Making text selectable in WebWorks App

Keep in mind that the solution you enabled creates a touch-and-hold context menu that pops up on every area of the page. The user experience can suffer.
----------------------------------------------------------------------------------------------
I kode for cudos! Or was it the other way around?
Developer
Posts: 51
Registered: ‎06-13-2011
My Device: Bold 9900, PlayBook 64GB, Dev Alpha
My Carrier: Bell Mobility

Re: Making text selectable in WebWorks App

That is a good point hababut, it will make the context menu appear if the user holds on any text. Not ideal if you have text labels in your UI, but is the best solution for now. You will see even RIM has this problem of selectable button labels in the Messages bridge app.
New Contributor
Posts: 2
Registered: ‎06-08-2010
My Device: -
My Carrier: -

Re: Making text selectable in WebWorks App

Once enabled only the selecting feature you can disable individual parts of the html with css styling. -khtml-user-select: none; I haven't check if you can also disable the context menu. My idea is not to activate that feature and build your own context menu. That's at least what I'm trying to build now.