Open
Bug 804036
Opened 12 years ago
Updated 1 month ago
dragenter event is fired twice when the dropzone is parent of draggable or draggable itself with Firebug
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect)
Tracking
()
NEW
People
(Reporter: danya.postfactum, Unassigned)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.92 Safari/537.4 Steps to reproduce: Create draggable element and listen ondragenter event of it or its parent. Start to drag the element. <a ondragenter="console.log(event.type)" draggable ondragstart="event.dataTransfer.setData('Text', 'test'); return true" href="#">Draggable</a> Actual results: dragenter event is fired twice on start dragging. If we move the element out of dropzone, dragleave event will be fired once only, though. Expected results: dragenter event should be fired only once
Reporter | ||
Comment 2•12 years ago
|
||
Reporter | ||
Updated•12 years ago
|
Attachment #674965 -
Attachment mime type: text/plain → text/html
Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 674965 [details]
This demonstrates firefox dragenter twofold event bug
Grab the first square blue border and drop (or move away from) it on body. You get:
dragenter BODY
dragenter BODY
dragleave BODY
instead of
dragenter BODY
dragleave BODY
So, we have entered twice into the river :)
Try to grab the first square (red area) and drop it on body. You get:
dragenter A
dragenter A
dragenter BODY
dragleave A
dragleave BODY
instead of
dragenter A
dragenter BODY
dragleave A
dragleave BODY
It is interesting, that if the draggable has TextNode, we get:
dragenter A
dragenter #text
dragenter A
dragleave #text
dragenter BODY
dragleave A
dragleave BODY
but if we have a Span instead of TextNode, we get:
dragenter SPAN
dragenter SPAN
dragenter A
dragleave SPAN
dragenter BODY
dragleave A
dragleave BODY
What I see in the webconsole with your testcase (FF16 on Win 7): 1) 1st blude border: dragenter BODY dragleave BODY 2) 1st red square: dragenter A dragenter BODY dragleave A dragleave BODY 3) Text of 2nd square: dragenter A dragenter #text dragenter A dragleave #text dragenter BODY dragleave A dragleave BODY 4) Yellow square: dragenter SPAN dragenter A dragleave SPAN dragenter BODY dragleave A dragleave BODY Could you try with a new profile, please. https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles
Reporter | ||
Comment 5•12 years ago
|
||
Excuse me. This bug is caused by FireBug... I have disabled FireBug and this issue has dissapeared.
Thanks for the report.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Summary: dragenter event is fired twice when the dropzone is parent of draggable or draggable itself → dragenter event is fired twice when the dropzone is parent of draggable or draggable itself with Firebug
Comment 7•12 years ago
|
||
Reported in Firebug issue list: http://code.google.com/p/fbug/issues/detail?id=6034 Honza
Comment 9•12 years ago
|
||
I have been testing this with a new fresh Firefox profile (no Firebug installed) and here is what I see in Web Console: 1) 1st blude border: dragenter BODY 2x dragleave BODY 2) 1st red square: dragenter A 2x dragenter BODY dragleave A dragleave BODY -> Note that Web console groups logs so, you need to check the red number at the right side of a message to see that it's been logged more than once. To, me it looks like 'dragenter' is called twice even if Firebug is not installed. Could anyone yet verify? Honza
Comment 10•12 years ago
|
||
(In reply to Jan Honza Odvarko from comment #9) > To, me it looks like 'dragenter' is called twice even if Firebug is not > installed. > > Could anyone yet verify? Indeed, "dragenter A" and "dragenter SPAN" are logged twice (tested with FF19).
Comment 11•12 years ago
|
||
(In reply to Loic from comment #10) > Indeed, "dragenter A" and "dragenter SPAN" are logged twice (tested with > FF19). Thanks for the update! So, I am reopening this report. Honza
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: WORKSFORME → ---
Comment 12•12 years ago
|
||
Multiple dragenters are invoked when the dragenter element is moving. See the attachement. Since this was a similar issue, I added it to this ticket rather than opening a new one.
Attachment #685248 -
Attachment mime type: text/plain → text/html
Comment 13•9 years ago
|
||
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0 Version 46.0a1 Build ID 20160112030207 Channel nightly Thank you for taking time to report this. Are you still able to reproduce this in the latest version ? I cannot reproduce this.
Component: Untriaged → Drag and Drop
Flags: needinfo?(danya.postfactum)
Product: Firefox → Core
Comment 14•9 years ago
|
||
It is not reproducible. Closing this as works for me. Feel free to reopen this bug if it still reproduces in the latest versions. Thanks
Status: REOPENED → RESOLVED
Closed: 12 years ago → 9 years ago
Resolution: --- → WORKSFORME
Comment 15•9 years ago
|
||
I can reproduce the attached testcase in: Version: 47.0a2 Build ID: 20160314004022 Update Channel: aurora User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 And I have run into this in an app I'm developing right now. Have to find a good workaround.
Comment 16•9 years ago
|
||
I forgot to mention that in the app I'm building I do not use the draggable attribute. I'm dragging files from desktop onto the element with the dragenter handler. But still the same issue I guess.
Comment 17•9 years ago
|
||
Yes, the event firing twice when you drag file from the Finder, straight into the window. P.S. I think Firefox should be removed from the internet. So much of so stupid bugs, that take hours to hack around, man...
Comment 18•9 years ago
|
||
Reopening this bug as I can reproduce the issue in Firefox release version. However, I could not reproduce this in nightly channel. The 'dragenter' is logged twice in release version When the first blue border is dragged. See attachment. I tested this using the following environments: Update Channel nightly Version 48.0a1 Build ID 20160328030215 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:48.0) Gecko/20100101 Firefox/48.0 and Update Channel release Version 45.0.1 Build ID 20160315153207 User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:45.0) Gecko/20100101 Firefox/45.0 It is also reproducible in win-7.
Updated•9 years ago
|
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Updated•9 years ago
|
Status: REOPENED → NEW
Comment 19•9 years ago
|
||
(In reply to Abe - QA from comment #18) > Reopening this bug as I can reproduce the issue in Firefox release version. > However, I could not reproduce this in nightly channel. Because you enabled e10s, it seems to be fixed with e10s, but it's still broken in non-e10s mode.
Comment 20•9 years ago
|
||
mibus32@gmail.com, can you test Nightly to confirm it works as intended with e10s enabled (you can enable/disable e10s in about:preferences#general > Enable multi-process Nightly): https://nightly.mozilla.org/
Flags: needinfo?(mibus32)
Comment 21•9 years ago
|
||
Yes, it is fixed with e10s but broken without e10s. Thanks Loic.
Updated•8 years ago
|
Flags: needinfo?(danya.postfactum)
Updated•2 years ago
|
Severity: normal → S3
Comment 22•1 month ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit BugBot documentation.
Flags: needinfo?(mibus32)
You need to log in
before you can comment on or make changes to this bug.
Description
•