To prevent selection on a specific HTML element, I attempted to use the "user-select" CSS property in order to achieve this functionality across all browsers. Here is an example of how it was implemented:
.section1{
-webkit-user-select: none; /* Chrome and Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE 10+ */
user-select: none; /* Future compatibility */
}
Initially, applying the "user-select" CSS property as "none" to all "sections div" worked successfully. However, when a section (section2) without the property applied was located between section1 and section3, selections were still possible from top or bottom of section2.
This issue specifically occurred in Internet Explorer, while Chrome and Firefox behaved as expected.
You can view the JSFiddle link for reference: https://jsfiddle.net/Thirunavukkarasu/bwf5emvp/