3

-moz- is the Problem here. -webkit- & -ms- are working:

document.body.style[-moz-user-select] = 'none';

https://jsfiddle.net/o2z04sre/1/

Maybe an alternative? Did try it with '-moz-none'

Krupp
  • 351
  • 1
  • 5
  • 18

2 Answers2

2

You can use camelcase instead, that seems to work

document.body.style.MozUserSelect = 'none';

FIDDLE

adeneo
  • 312,895
  • 29
  • 395
  • 388
0

-moz-user-select Non-standard

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

Take a look at user-select Documentation for more informations, you could find an alternative in the following post CSS rule to disable text selection highlighting.

Hope this helps.

Community
  • 1
  • 1
Zakaria Acharki
  • 66,747
  • 15
  • 75
  • 101