user823527 user823527 - 1 month ago 4x
HTML Question

User select:none causes input field to be inaccessible on Safari

With these css styles I prevent the highlighted text selection on a page. But this causes the input fields to be locked from user input on Safari.

* {
-webkit-touch-callout: none;
-webkit-user-select: none; // locks fields on Safari
-khtml-user-select: none; // locks fields on Safari
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

Is there a way on Safari to prevent user selection without interfering with input fields?


Why not just apply the style to everything but the inputs?

css3 way: *:not(input){...}