Opened 10 years ago

Closed 6 years ago

#9688 closed defect (invalid)

[patch] dojo._getIeDispatcher() doesn't return value.

Reported by: yoava Owned by: Kris Zyp
Priority: high Milestone: future
Component: Events Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Problem: dojo._getIeDispatcher() doesn't return value.

Details: This means that when connecting a new event to link like this <a href="..." onclick="return false"/> (which cancels default behavior) causes the link open href onclick (becuase false is not returned). This happens only in IE of course.

Simple Solution: Change dojo._getIeDispatcher as follows:

dojo._getIeDispatcher = function(){[[BR]]
  return new Function('''"return " +''' dojo._scopeName + "._ieDispatcher(arguments, this)");[[BR]]
}

Attachments (1)

ieCancel.html (565 bytes) - added by bill 9 years ago.
test case (put parallel to dojo/) bug is that clicking the second link navigates to dojotoolkit.org on IE

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by bill

Milestone: 1.4tbd

You'll need to attach a test case.

comment:2 Changed 10 years ago by bill

Description: modified (diff)

comment:3 Changed 10 years ago by bill

Description: modified (diff)

PS: it sounds like a trivial thing to reproduce but it's just our policy to always ask for test cases attached to the tickets (using the attach file button, available after you create the ticket).

comment:4 Changed 9 years ago by James Burke

Resolution: invalid
Status: newclosed

No test case, closing for now. it is not clear if the report means that

a) <a href="" onclick="return false"> gets another connection via dojo.connect,

or b) if the tag starts out as <a href=""> and there is a dojo.connect(aNode, "onclick", function(evt){return false;});

If b) the proper way to stop it is evt.preventDefault();

Feel free to reopen with a test case.

comment:5 Changed 9 years ago by bill

Resolution: invalid
Status: closedreopened

I had hoped yoava would file a test case but I hate to close such a trivial ticket so I caved in and wrote one.

Changed 9 years ago by bill

Attachment: ieCancel.html added

test case (put parallel to dojo/) bug is that clicking the second link navigates to dojotoolkit.org on IE

comment:6 Changed 9 years ago by dante

Milestone: tbdfuture

comment:7 Changed 9 years ago by bill

Description: modified (diff)
Summary: dojo._getIeDispatcher() doesn't return value.[patch] dojo._getIeDispatcher() doesn't return value.

The solution is written above (just adding "return" into _getIeDispatcher()). Given the triviality of the change no CLA is needed.

comment:8 Changed 7 years ago by bill

Owner: changed from sjmiles to Kris Zyp
Status: reopenednew

Still an issue in 1.7.

comment:9 Changed 6 years ago by Kitson Kelly

Resolution: invalid
Status: newclosed

This appears to now be invalid as _getIeDispatcher is no longer part of the code. I suspect when dojo/_base/connect was rewritten to leverage dojo/on this became obsolete.

Note: See TracTickets for help on using tickets.