Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select a text with a cursor in a <button> element?

I found a strange behavior, I cannot select a text in a <button> element. As an example, please try to select a text in these buttons of Bootstrap: http://getbootstrap.com/components/#list-group-buttons

enter image description here

Is it some standard behavior or is it editable? I need to select text in buttons.

like image 597
Green Avatar asked Dec 28 '15 13:12

Green


1 Answers

You could do the reverse of this question: create the following CSS3:

.list-group-item{
-webkit-touch-callout: text;
-webkit-user-select: text;
-khtml-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
}

and link the stylesheet. It works on my firefox.

Edit: changed "all" to "text" as Nenad Vracar said. It works in Chrome and Firefox for me now

like image 117
Appelemac Avatar answered Sep 22 '22 19:09

Appelemac