Y
Y
Yarik2020-05-03 17:21:32
css
Yarik, 2020-05-03 17:21:32

How to disable auto-select on double click?

On the element, there is a double-click event, but there is text in the element itself, how can I make this text not be highlighted when I click 2 times, but it could be selected simply by holding down the mouse button

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2020-05-03
@Yariik

div {
  -webkit-touch-callout: none; /* iOS Safari */
  -webkit-user-select: none; /* Chrome/Safari/Opera */
  -khtml-user-select: none; /* Konqueror */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
  user-select: none; /* Non-prefixed version, currently
                                  not supported by any browser */
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question