Skip to content

Commit

Permalink
Mouse: Limit mouseup out of window check to only versions of IE earli…
Browse files Browse the repository at this point in the history
…er than 9 as IE9 has this fixed. Fixes #5370 - All drag & drop events fail in IE9.
  • Loading branch information
rdworth committed Oct 14, 2010
1 parent 715f83f commit 8fcf58e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.mouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $.widget("ui.mouse", {

_mouseMove: function(event) {
// IE mouseup check - mouseup happened when mouse was out of window
if ($.browser.msie && !event.button) {
if ($.browser.msie && parseInt(jQuery.browser.version, 10) < 9 && !event.button) {
return this._mouseUp(event);
}

Expand Down

1 comment on commit 8fcf58e

@tstrohecker
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a small issue with this fix. You are checking the browser version, but what if they are running in compatability mode, and the document mode is IE9. Then the mouseup event would be fired when it shouldn' be. Quick fix.

   if ($.browser.msie && parseInt(jQuery.browser.version, 10) < 9 && !event.button) {
            var documentVersion = document.documentMode;
            if (documentVersion < 9) {
                return this._mouseUp(event);
            }
     }
Please sign in to comment.