Disable click tracking by input type

I want to turn off click tracking on a range of input type, only allow drag and drop of the thumb.

I can do this in all browsers except Microsoft Edge and Internet Explorer.

I do so

#slider {
  display: block;
  width: 400px;
  height: 40px;
  margin: 0px auto;
  padding: 5px 10px;
  z-index: 20;
  border-radius: 20px;
  pointer-events: none;
}

#slider::-moz-range-thumb {
  pointer-events: auto !important;
}

#slider::-webkit-slider-thumb {
  pointer-events: auto !important;
}

#slider::-ms-thumb {
  pointer-events: auto !important;
}

#slider::-ms-track {
  pointer-events: none !important;
}
<input id="slider" type="range" value="0" min="0" max="100" autocomplete="off" />
Run codeHide result

Please see why it does not work in Microsoft Edge and Internet Explorer and offers any possible way to do this.

thank

+4
source share
1 answer

using jquery disable

$ ("input [name = Range]") CSS ("pointer-event", "NONE") .. $ ("Input [name = range]") CSS ("disabled", "disabled");

to normal

$( " [ = Range]" ) CSS ( "-", "" ). $( " [ = amountRange]" ) removeAttr ( "" );.

0

Source: https://habr.com/ru/post/1683564/


All Articles