Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Disable Shift+Click selection in browsers (See related posts)

I wanted the table to allow the user to select a range of rows with a Shift+Click… The problem is that, by default, the browser will select the page’s text content. This isn’t something you’ll want to do very often but it is possible to get around this:

Firefox can do this from your CSS:

table {

    -moz-user-select: none;
}
On the table element IE needs:

the_table_node.onselectstart = function () {

    return false;
};

You need to create an account or log in to post comments to this site.


Related Posts