Never been to CodeSnippets 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;
};

Comments on this post

erikfzr posts on Oct 20, 2008 at 07:49
what is exactly meant by "On the table element"?

Is it within the HTML code?
Or within the CSS?

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