Skip to main content

Search and Top Navigation

#5370 closed bug (fixed)

Opened March 18, 2010 04:23AM UTC

Closed October 15, 2010 08:07AM UTC

Last modified September 29, 2011 11:54AM UTC

All drag & drop events fail in IE9

Reported by: itpretty Owned by:
Priority: blocker Milestone: 1.8.6
Component: ui.mouse Version: 1.7.2
Keywords: IE9 Cc:
Blocked by: Blocking:
Description

Preview demos of http://jqueryui.com/demos/sortable in IE9 (http://ie.microsoft.com/testdrive/Default.html). All the drag & drop events fail.

Attachments (0)
Change History (21)

Changed March 18, 2010 04:42AM UTC by Rwhitbeck comment:1

resolution: → wontfix
status: newclosed

IE9 is not is in a release state where we will look at bugs.

Changed September 15, 2010 07:06PM UTC by Alkarex comment:2

resolution: wontfix
status: closedreopened

Changed September 16, 2010 11:36AM UTC by gavtaylor comment:3

could do with this bug being set as blocking the next milestone.

Changed September 16, 2010 02:00PM UTC by rdworth comment:4

component: ui.sortableui.mouse

Changed September 16, 2010 02:02PM UTC by rdworth comment:5

priority: majorblocker

Changed September 17, 2010 07:31AM UTC by rdworth comment:6

See related ticket #5197 which suggests use of mouse capture

Changed September 23, 2010 03:40AM UTC by Tanguy comment:7

could be fixed here, by removing the msie "fixup" if version is '9.0' :

http://dev.jqueryui.com/browser/ui/jquery.ui.mouse.js?rev=8a5d4ca3213e1e80fdbe51243ddaa27c8e618a73#L100

Changed September 23, 2010 04:43PM UTC by Alkarex comment:8

Replying to [comment:7 Tanguy]:

could be fixed here, by removing the msie "fixup" if version is '9.0' : http://dev.jqueryui.com/browser/ui/jquery.ui.mouse.js?rev=8a5d4ca3213e1e80fdbe51243ddaa27c8e618a73#L100

Hello,

Yes indeed. While removing this section or using some smarter feature detection would be better, I am having good success with IE9b1 by replacing this line 100 by:

if ($.browser.msie && (!event.button) && (parseInt(c.browser.version) < 9)) {

Regards,

Alexandre

http://alexandre.alapetite.fr

Changed September 27, 2010 08:09AM UTC by stakach comment:9

Replying to [comment:8 Alkarex] and to [comment:7 Tanguy]:

There also seems to be a problem calculating the pageX and pageY offsets on mouse events (contextmenu, click ect).

See http://www.trendskitchens.co.nz/jquery/contextmenu/ as an example.

After right clicking on an item scroll to the bottom of the page, that is where the menu ends up.

The event fires with pageX and pageY undefined.

Changed October 06, 2010 01:01PM UTC by PKBurgess1983 comment:10

Replying to [comment:8 Alkarex]:

Replying to [comment:7 Tanguy]: > could be fixed here, by removing the msie "fixup" if version is '9.0' : > http://dev.jqueryui.com/browser/ui/jquery.ui.mouse.js?rev=8a5d4ca3213e1e80fdbe51243ddaa27c8e618a73#L100 > Hello, Yes indeed. While removing this section or using some smarter feature detection would be better, I am having good success with IE9b1 by replacing this line 100 by:
> if ($.browser.msie && (!event.button) && (parseInt(c.browser.version) < 9)) {
> 
Regards, Alexandre http://alexandre.alapetite.fr

Hi Guys,

I have tried editing the code with this line but still getting no joy with the draggable elements.

Have you managed to make it work yet??

Thanks for any help.

Changed October 06, 2010 01:47PM UTC by gavtaylor comment:11

this bug is blocking the wrong milestone, needs updating to block milestone 1.9

Changed October 06, 2010 02:00PM UTC by scottgonzalez comment:12

milestone: 1.81.9

Changed October 14, 2010 09:56AM UTC by rdworth comment:13

resolution: → fixed
status: reopenedclosed

Fixed in 8fcf58e

Changed October 14, 2010 08:03PM UTC by xirzec comment:14

resolution: fixed
status: closedreopened

Sorry to re-open this, but if the browser happens to be in a compatibility view, this check will not be sufficient. For instance, the page itself could opt to set the Doc Mode to IE9 with the following:

<meta http-equiv="X-UA-Compatible" content="IE=9"/>

So if the browser is in a compatibility view (say IE7 because it is hosted on an intranet webserver) and the page specifies the above, the Doc Mode will be IE9 Standards, but the User-Agent will still be IE7.

This will cause jQuery.browser.version to be set to 7, even though the page does support standard mouse events. A correct check would also consider document.documentMode before assuming the browser is IE7.

My apologies if this is something that needs to be fixed where jQuery.browser.version is populated rather than here.

Changed October 15, 2010 03:24AM UTC by Tanguy comment:15

if i remember right, IE9 use now event.buttons which contains all pressed buttons instead of event.button

it is how ive fixed this issue in fullcalendar :

var msie9 = false;

//IE9 dnd fix (jQuery UI Mouse (<= 1.8.5) doesnt support IE9)
if ($.ui && $.browser.msie && parseInt($.browser.version,10) >= 9) {
	msie9 = true;
	var mm=$.ui.mouse.prototype._mouseMove;
	$.ui.mouse.prototype._mouseMove=function(b){b.button=1;mm.apply(this,[b]);}
}

Changed October 15, 2010 08:07AM UTC by rdworth comment:16

resolution: → fixed
status: reopenedclosed

Replying to [comment:14 xirzec]:

Sorry to re-open this, but if the browser happens to be in a compatibility view, this check will not be sufficient. For instance, the page itself could opt to set the Doc Mode to IE9 with the following: <meta http-equiv="X-UA-Compatible" content="IE=9"/> So if the browser is in a compatibility view (say IE7 because it is hosted on an intranet webserver) and the page specifies the above, the Doc Mode will be IE9 Standards, but the User-Agent will still be IE7. This will cause jQuery.browser.version to be set to 7, even though the page does support standard mouse events. A correct check would also consider document.documentMode before assuming the browser is IE7. My apologies if this is something that needs to be fixed where jQuery.browser.version is populated rather than here.

Thanks. Fixed in ec73a59

Changed October 15, 2010 09:42AM UTC by oov comment:17

See related ticket #5197

Changed October 25, 2010 06:51PM UTC by scottgonzalez comment:18

milestone: 1.91.8.6

Changed November 19, 2010 06:26PM UTC by Richard D. Worth comment:19

Mouse: Limit mouseup out of window check to only versions of IE earlier than 9 as IE9 has this fixed. Fixes #5370 - All drag & drop events fail in IE9.

Changeset: 8fcf58e29e4adfdcf9bef5c9e35bde932c165aa8

Changed November 19, 2010 06:26PM UTC by Richard D. Worth comment:20

Mouse: better check for not IE9 or greater in case mode was set by X-UA-Compatible. See http://msdn.microsoft.com/en-us/library/cc196988%28VS.85%29.aspx for more info. Fixes #5370 - All drag & drop events fail in IE9. Thanks xirzec.

Changeset: ec73a59c77c522a45b3a22ea74515c36b7db45a5

Changed September 29, 2011 11:54AM UTC by scottgonzalez comment:21

#7748 is a duplicate of this ticket.