[Javascript] disableselect in firefox

Paul Novitski paul at novitskisoftware.com
Wed Mar 1 20:14:45 CST 2006


>On 3/1/2006 07:42 PM, Troy III Ajnej wrote:
>
>>Actually, I'm trying to prevent it happening while dragging a HTML 
>>object (my Picture Navigator) to a different location. Because, if 
>>it happens while drragging, the dragg functionality gets 
>>interrupted and it doesn't follow the mouse until the mouse button 
>>is released etc.

At 05:56 PM 3/1/2006, Lee Underwood wrote:
>This might work for you or you could adapt it.
>
>http://javascript.internet.com/page-details/disable-text-selection.html


Interestingly, this technique disables text selection IFF begun in 
the identified area.  I can begin my text-selection in the preceding 
section and carry the selection into the "disabled" section.  Here's 
a text selection from the web page using my mouse and copied & pasted here:

>selection before it starts. You can even attach the events to a 
>specific element.
>[This section of text cannot be selected.] Lorem ipsum dolor sit 
>amet, consectetuer adipiscing elit
...

Troy, you'd have to play with it to see if you could extend the 
boundaries of the disabled area widely enough to prevent this from 
occurring and without disabling the drag-&-drop functionality you're creating.

Paul 




More information about the Javascript mailing list