user823527 user823527 - 1 year ago 106
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?

Answer Source

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

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download