Closed Bug 916439 Opened 11 years ago Closed 5 years ago

Breakpoint in dragenter/dragleave event handler causes Firefox to hang

Categories

(DevTools :: Debugger, defect, P3)

23 Branch
x86_64
Windows 7
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: danya.postfactum, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36

Steps to reproduce:

1) Open http://www.w3schools.com/html/html5_draganddrop.asp
2) Open DevTools0->JS Debugger, select "html5_draganddrop.asp" resource
3) Set breakpoint on 112 line:
function allowDrop(ev)
{
    ev.preventDefault();
}
This function will be called on dragenter/dragover events
4) Grab sample image and start dragging.


Actual results:

Browser stuck in drag state, but it still responsive on mouse wheel events. The cursor is "not_allowed". You can not close browser


Expected results:

Browser should exit dragging state on mouse release (mouseup).
Confirmed in nightly 26.0a1 (2013-09-15), Win 7 x64.
Status: UNCONFIRMED → NEW
Component: Untriaged → Developer Tools: Debugger
Ever confirmed: true
Also on focus event handlers as well. I stumbled up this while working on bug 

STR:

1. Go to http://todomvc.com/labs/dependency-examples/enyo_backbone/
2. Add breakpoint on line 3108 in enyo.js (the line reads "enyo.bubble(arguments[0]);")
3. Toolbox freezes

Focus any other window, then refocus Firefox => everything is responsive again. Neat!
See Also: → 800857
(In reply to Victor Porof [:vp] from comment #2)
> Also on focus event handlers as well. I stumbled up this while working on
> bug 

... on bug 800857.
Interestingly enough, after clicking resume a ton of times, the browser became unfrozen for me.
Taking a weird bet that moving all event listener-related stuffs to WebIDL (bug 888591) will solve all these problems.
Needinfo'ing Ms2ger for his opinion (feel free to move the question to someone else if you weren't the right person to ask).
Flags: needinfo?(Ms2ger)
I think you meant bug 862627, which is fixed.

No idea about this bug, maybe smaug has an idea.
Flags: needinfo?(Ms2ger) → needinfo?(bugs)
Hmm, so we end up staying in the dragsession forever if break point is there.
It is not clear to me what the behavior should be. Should we suspend the drag session on breakpoint and
resume when we're past it?
This sounds like something devtools will need to handle, although if dragsession API doesn't
provide the right feature set, need to add something there too.
Flags: needinfo?(bugs)
Priority: -- → P3
> Should we suspend the drag session on breakpoint and resume when we're past it?

FWIW the Chrome DevTools let the user finish the drag session. Allowing to resume the drag session means the user has to click again to finish it, right?

Sebastian
Summary: Browser freezes on breakpoint inside dragenter/dragleave event handlers → Breakpoint in dragenter/dragleave event handler causes Firefox to hang
See Also: → 1016969
Blocks: dbg-dom
No longer blocks: dbg-breakpoint
not only does it hang firefox, but it ALSO breaks ALL OTHER OS-level drag-drop in windows (ie, dragging icons in desktop/explorer, dragging emails in Outlook, etc...)
Product: Firefox → DevTools

I can't reproduce this bug using STRs from comment #0

@Danya: the Debugger panel has been completely refactored since 6 years ago.

Can you still see this bug?

Honza

Flags: needinfo?(danya.postfactum)

Closing for now. Happy to re-open if you can reproduce

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.