<https://lh5.googleusercontent.com/-IwIhBRkCDIM/U4xMYpfqq3I/AAAAAAAAEh0/pg89A7M8xAo/s1600/dnd.jpg>


I've implemented a simple drag and drop system using directives in 
Angular.It works fine in Chrome, but Firefox doesnt expose 
event.clientX,event.clientY properties on drag event(They just refuse to 
fix it). So i'm looking for a good alternative to expose these properties 
on drag event : 

the x,y coordinates are needed for visual feedback on drag event.

Code is here : 

http://embed.plnkr.co/ApeyQ4FcdsA8Ez18Roi0/preview

check out in Chrome and firefox to see the problem.

In Chrome,drag an item in the folders,you'll have the same item as visua 
lfeedback, not in Firefox.

the problem is here :(beginning line 45)

.on('drag', function(e) { //clientX or clientY not available on Firefox 

                            if (e.originalEvent.clientX) {
>                                 el.css({
>                                     'top': e.originalEvent.clientY + 10,
>                                     'left': e.originalEvent.clientX + 10
>                                 });
>                             } else {
>                                 el.css('display', 'none');
>                             }
>                         });


So how can I get the mouse position on screen during a drag event, in 
Firefox ?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to