Mouse: Fixed #4061: Prevent errors when manually triggering mousedown events on elements that use $.ui.mouse (event.originalEvent isn't defined).

This commit is contained in:
Scott González 2009-02-05 02:33:21 +00:00
parent 27a7442a37
commit 57f0188239

View File

@ -423,6 +423,8 @@ $.ui.mouse = {
_mouseDown: function(event) { _mouseDown: function(event) {
// don't let more than one widget handle mouseStart // don't let more than one widget handle mouseStart
// TODO: figure out why we have to use originalEvent
event.originalEvent = event.originalEvent || {};
if (event.originalEvent.mouseHandled) { return; } if (event.originalEvent.mouseHandled) { return; }
// we may have missed mouseup (out of window) // we may have missed mouseup (out of window)