HumbleSoftware / envisionjs

Dynamic HTML5 visualization

Home Page:http://www.humblesoftware.com/envision

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selection in the 'summary' area selects text from other sections

Frozenlock opened this issue · comments

Minimum working example: http://jsfiddle.net/ezJcH/1/

If you try to select a range in the summary section, it will select the text in the legend.
(It will also select labels, if any.)

Is there a way to prevent this selection?
The selection disappear once the mouse button is released, but while the user drag it can be very distracting.

Silly me, I just saw what could solve this problem in the CSS file:

 -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;

Yes, that's correct. There are also a few JS solutions to this if you need specific support for older browsers which do not have those CSS rules.

I've also used a hybrid approach where I add a CSS class which disables selection only at the beginning of a selection operation, and remove that class after selection is complete.