Search and Top Navigation
#2918 closed bug (worksforme)
Opened May 21, 2008 07:03PM UTC
Closed May 25, 2008 11:12PM UTC
DRAG object causes extra CLICK event in Mozilla - simple code example included
Reported by: | chrishandorf | Owned by: | paul |
---|---|---|---|
Priority: | major | Milestone: | 1.5 |
Component: | ui.draggable | Version: | 1.5b4 |
Keywords: | draggable | Cc: | |
Blocked by: | Blocking: |
Description
Run code below in Safari or I.E. When you drag the yellow box on the screen you will see a series of mousedown/dragstart/dragstop events.
When running in Mozilla 2.0.0.14 (winxp) however, you will occasionally get both MOUSEUP and CLICK events at the conclusion of a DRAG/DROP sequence.
This example is a condensed version of a real application that needs to handle DRAG and CLICK events differently on the yellow box. Unfortunately, Mozilla is combining them so the DRAG also causes a CLICK which breaks the interface.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style> .folder { background: yellow; width: 200px; } .folderLabel { overflow: hidden; width: 150px; } </style> </head> <body> <div> <div class="folder" id="Folder1"> <div class="folderLabel">Folder1</div> </div> <br><br><br> <div class="log"></div> <script src="jquery-1.2.4b.js" type="text/javascript"></script> <script src="jquery.ui-all-1.5b4.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ var debug = $(".log"); function md() {debug.append("mousedown<br>") } function mu() {debug.append("mouseup<br>") } function ck() {debug.append("click<br>") } function ds() {debug.append("dragstart<br>"); } function dt() {debug.append("dragstop<br>"); } $(".folder").mousedown(md).mouseup(mu).click(ck); $(".folder").draggable({helper:"clone",start:ds,stop:dt}); }); </script> </body> </html>
Attachments (0)
Change History (3)
Changed May 22, 2008 02:05PM UTC by comment:1
component: | core → ui |
---|---|
keywords: | → draggable |
owner: | → paul |
Changed May 24, 2008 07:19PM UTC by comment:2
component: | ui.core → ui.draggable |
---|
Changed May 25, 2008 11:12PM UTC by comment:3
resolution: | → worksforme |
---|---|
status: | new → closed |
This is not reproducable for me using the newest trunk versions, both on FF2 and FF3.. could you check again and reopen if it still happens?