How to disable text selection on Shopify store?
For some reason, you don’t want to allow visitor select text on page. It is possible with CSS code.
You open CSS file of your current theme and add the below code into it:
1 2 3 4 5 6 7 8 | .noselect { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } |
Now, you must add the class name “noselect” into the wrapper tag you don’t want to allow select text.
Example:
1 2 3 | <div class="product-desc noselect"> Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... </div> |
If you would to make it for all elements on page, you must add this class name in to body tag.