Ticket #5370 (closed bug: fixed)

Opened 4 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

Change History

comment:1 Changed 4 years ago by Rwhitbeck

  • Status changed from new to closed
  • Resolution set to wontfix

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

comment:2 follow-up: ↓ 3 Changed 4 years ago by Alkarex

  • Status changed from closed to reopened
  • Resolution wontfix deleted

comment:3 in reply to: ↑ 2 Changed 4 years ago by gavtaylor

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

comment:4 Changed 4 years ago by rdworth

  • Component changed from ui.sortable to ui.mouse

comment:5 Changed 4 years ago by rdworth

  • Priority changed from major to blocker

comment:6 Changed 4 years ago by rdworth

See related ticket #5197 which suggests use of mouse capture

comment:7 follow-up: ↓ 8 Changed 4 years ago by 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

comment:8 in reply to: ↑ 7 ; follow-up: ↓ 10 Changed 4 years ago by Alkarex

Replying to 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

comment:9 Changed 4 years ago by stakach

Replying to Alkarex and to 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.

comment:10 in reply to: ↑ 8 Changed 4 years ago by PKBurgess1983

Replying to Alkarex:

Replying to 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.

comment:11 Changed 4 years ago by gavtaylor

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

comment:12 Changed 4 years ago by scott.gonzalez

  • Milestone changed from 1.8 to 1.9

comment:13 Changed 4 years ago by rdworth

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in  8fcf58e

comment:14 follow-up: ↓ 16 Changed 4 years ago by xirzec

  • Status changed from closed to reopened
  • Resolution fixed deleted

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.

comment:15 Changed 4 years ago by Tanguy

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]);}
}

comment:16 in reply to: ↑ 14 Changed 4 years ago by rdworth

  • Status changed from reopened to closed
  • Resolution set to fixed

Replying to 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

comment:17 Changed 4 years ago by oov

See related ticket #5197

comment:18 Changed 3 years ago by scott.gonzalez

  • Milestone changed from 1.9 to 1.8.6

comment:19 Changed 3 years ago by Richard D. Worth

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

comment:20 Changed 3 years ago by Richard D. Worth

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

comment:21 Changed 3 years ago by scott.gonzalez

#7748 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.