а

Enable user-select text in List


#1

I have a dhtmlXList which contains som text in an html-template.
I would like the user to be able to select the text for copying (with the left mouse-click, like with a regular html/text-element).
I’ve tried over-riding the .dhx_list user-select class, but I can’t get it to work.
.dhx_list {
-webkit-user-select: text; /* Chrome, Opera, Safari /
-moz-user-select: text; /
Firefox 2+ /
-ms-user-select: text; /
IE 10+ /
user-select: text; /
Standard syntax */
}

Snippet:
http://snippet.dhtmlx.com/ac287a5a3

Maybe I’m using the wrong control for this?
I basically want something that looks like a list (and with the dynamic item height) but with the possibility for selecting
content the way explained above.
Thanks :slight_smile:


#2

I apologize for the delay.

Please, try to add also the following code to your page:
myList._obj.onselectstart = function(){return true};
It should solve the problem.

Please, refer to the updated snippet:
snippet.dhtmlx.com/bc1e0d295