I have a page with multiple tiles implementing shift-key multi-select. The problem occurring only in IE-11 is that if any text field is clicked shift-key multi-selecting, the whole browser's text gets highlighted. I have read other answers and none seem to work, including -ms-user-select: none , removeAllRanges() etc. One thing to note is that if I try and highlight a text field without pressing shift, it doesn't get highlighted ( apparently the user-select: none is working here). is there any css-only solution available then?
If any text is clicked:
The trick was to use event.PreventDefault() not only in the onClick() event but also for the mouseDown() event. Otherwise, the text will be highlighted as long as the click isn't released.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.