Ticket #2529136 (closed defect)

Reporter


Iliyan Peychev
Opened: 09/20/10
Last modified: 11/19/12
Status: closed
Type: defect
Resolution: wontfix

Owner


Dav Glass
Target Release:
Priority: P2 (high)
Summary: Drag&Drop does not work in IE9 (Document mode - IE9 standards)
Description:

Drag&Drop does not work in IE9 Beta (Document mode - IE9 standards).
The code that breaks is in DragDropMgr.js, "handleMouseMove" method:

if (YAHOO.util.Event.isIE && !e.button) {
....
return;
}

In IE9 (IE9 standards) e.button is 0, function returns and Drag&Drop does not start.

Resize and Layout components also don't work, but the issue should be similar or same.

Type: defect Observed in Version: 2.8.1
Component: DragDrop Severity: S3 (normal)
Assigned To: Dav Glass Target Release:
Location: Library Code Priority: P2 (high)
Tags: Relates To:
Browsers: All
URL:
Test Information:

Check any of the examples, related to Drag&Drop at YUI2 site.

Change History

Dav Glass

Posted: 09/20/10
  • location changed to Library Code
  • milestone changed to 2.9.0
  • priority changed to P2 (high)
  • status changed from new to accepted

Dav Glass

Posted: 09/20/10

A fix for this has been checked into HEAD and will be available on the next build:

http://github.com/davglass/yui2/commit/0179a9ef177b5cee565f0e3db1f4bb75e9542cf2

Iliyan Peychev

YUI Contributor

Posted: 09/20/10

This patch must be improved. Right now it broke the other browsers, for example Google Chrome.

Your patch is:

if ((YAHOO.util.Event.isIE < 9) && !e.button) {

In Chrome, "isIE" will be 0 (of course) and "e.button" will be 0 also. The whole expression will be true and in fact - Drag&Drop stopped to work this time in Chrome. :)

Also, I think "YAHOO.env.ua.ie" is better choice when you check for specific version, instead a method, which starts with "is", for example:

var ieVersion = YAHOO.env.ua.ie;
if ((ieVersion > 0 && ieVersion < 9) && !e.button) {

Dav Glass

Posted: 09/20/10

Ha, my bad, I pushed the old commit and didn't push the one that fixed that..

Here's the one with the "right" patch:
http://github.com/davglass/yui2/commit/f2393a0221b810b03179bc784dabbbe9c85b5a1b

Iliyan Peychev

YUI Contributor

Posted: 09/21/10

The second patch is incorrect too. :)
You just changed "YAHOO.util.Event.isIE" to "YAHOO.env.ua.ie":
- if ((YAHOO.util.Event.isIE < 9) && !e.button) {

+ if ((YAHOO.env.ua.ie < 9) && !e.button) {

The correct code should be:
if ((YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 9) && !e.button) {

Dav Glass

Posted: 09/21/10

Wow, I really screwed up that set of commits. It's been a while since I looked at 2.x code ;)

http://github.com/davglass/yui2/commit/87f00009db28dc511d0c239e9f359894a732bdb4

Dav Glass

Posted: 09/22/10
  • milestone changed from 2.9.0 to 2.NEXT

Dav Glass

Posted: 12/20/10
  • milestone changed from 2.NEXT to 2.9.0

Dav Glass

Posted: 01/10/11
  • status changed from accepted to checkedin

Dav Glass

Posted: 01/13/11
  • resolution changed to fixed

[Fixes #2529136] - Fixed issue with IE9 beta not reporting e.button properly
View Commit: 0179a9ef177b5cee565f0e3db1f4bb75e9542cf2

Dav Glass

Posted: 03/16/11

Ticket #2529307 was marked as a duplicate of this ticket.

George

YUI Developer

Posted: 04/13/11
  • status changed from checkedin to closed

bing [bot]

  • Username: bing [bot]
Posted: 11/14/12
  • browser changed from IE 9.x to All

jitendra.saklani

Posted: 11/19/12
  • milestone changed from 2.9.0
  • resolution changed from fixed
  • status changed from closed to reopened

jitendra.saklani

Posted: 11/19/12

Hi Dav,
Unfortunately drag&drop is not working in IE8 when we change document mode to IE8 Standards. Below code is having issue:

if (YAHOO.util.Event.isIE && !e.button) {
this.stopEvent(e);
return this.handleMouseUp(e);
}

When we comment this chunk of code, the dragging works but it has issue in dragging out of the drag area.

Thanks.

Dav Glass

Posted: 11/19/12
  • resolution changed to wontfix
  • status changed from reopened to closed

We are not fixing issues with YUI 2, the project is in maintenance mode.