I need all elements on the entire page. But at the same time it was possible to work normally with input fields of the type input, textarea . I know you need to use it.

 user-select: none; 

and

 user-select: text; 

And accordingly with the prefixes -moz, -khtml, -webkit, -ms .

But if I set, for example, for all divs user-select: none , then it does not matter what property the input element has. Anyway, it will not be possible to select text in the field with the mouse. If I set user-select: none only for body, then all elements continue to be allocated. If you set user-select: none for divs, the effect is the same - you can select them.

How is such a problem being solved at all: to prohibit the selection of an arbitrary structure on the whole page with a mouse so that you can work normally with input fields ???

    1 answer 1

    do something like:

      * { user-select:none; } * input, * textarea { user-select:text; } 

    the more accurate the path, the greater his priority