Making Text Selectable – The CSS Way


The problem –

The Bug!

And on another issue..

The Bug – Again

The two issues are this one and this one.

The problem seemed quite simple! And it is actually quite simple!

Just inspect the elements in developer console, and add the following CSS to make the text selectable:

CSS For Making Text Selectable

So that’s it, the cheat line you’re looking for — in JSX:

userSelect : 'text'

Or in CSS:

user-select:  'text' 

That fixed everything, globally!

Written with love,
Rishabh Budhiraja

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s