How to debug mousedown/mouseup/mouseout events when combined?

211 views
Skip to first unread message

luismartin

unread,
Feb 10, 2012, 10:28:25 AM2/10/12
to Firebug
I need to fix a bug I'm having in a js code I made for a scroll. When
the user clicks and keeps clicked on a scroll button, and she
accidentally right clicks before releasing, the mouseup/mouseout
events, which should stop the scroll, don't respond. And on the next
button click the scrolled content appears to be jammed.

I don't know how to debug this in Firebug, as I need to maintain the
mousedown event while stepping forward through the lines.

Any idea?

Sebo

unread,
Feb 10, 2012, 11:32:29 AM2/10/12
to fir...@googlegroups.com
Right-clicking doesn't influence the mouseup/mouseout event. Have a look at the attached test file and click on the blue <div>.
To check that out, you can set breakpoints into the event handlers and see, if they are hit. Also note, that you can set a conditional breakpoint into your mousedown event handler with event.button == 2 as condition. Maybe that helps investigating.

Sebastian
rightClick.html
Reply all
Reply to author
Forward
0 new messages