Re: Default CSS style on draggable elements

Laurent Jouanneau <[email protected]>
Newsgroups gmane.comp.mozilla.devel.dom
Message-ID <C_2dnfyuFqmukSXVnZ2dnUVZ_hednZ2d__7607.47316894612$1220021490$gmane$org@mozilla.org>
Neil Deakin wrote:
> Laurent Jouanneau wrote:
>> Hello,
>>
>> I created a web page 
>> (http://ljouanneau.com/lab/html5/demodragdrop.html) to test the new 
>> drag'n'drop API of HTML5 (bug 356295). It works, but I should have to 
>> add the CSS style -moz-user-select:none;, so the drag can start 
>> immediately. If I don't put this style, I should click a first time on 
>> the draggable element, and then I can start a drag.
>>
> 
> Normally when dragging text, a selection is made. It was unclear when 
> implementing what behaviour should have been used, so I didn't change 
> the usual selection behaviour. However, nowadays I'm leaning towards 
> just ignoring the mouse event listeners that handle selections when a 
> draggable attribute exists on an element or ancestor, such that 
> draggable elements cannot be selected.

Ok

here is the bug I created

https://bugzilla.mozilla.org/show_bug.cgi?id=452787

> 
>> (same issue with XUL http://ljouanneau.com/lab/html5/demodragdrop.xul 
>> ;-) )
> 
> The draggable attribute doesn't apply to XUL; all XUL elements are 
> draggable, and XUL hbox elements are not selectable anyway, so I'm not 
> clear what issue you're referring to here.

Sorry, I made a mistake, it works perfectly in my XUL example, without 
this draggable attributes and the -moz-user-select settings. I updated 
my XUL example :-)

Laurent
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.