Opened 15 years ago

Closed 15 years ago

#2078 closed defect (fixed)

dojo.event.connect() fails to connect to FireFox iframes in designMode

Reported by: andrew Owned by: sjmiles
Priority: high Milestone: 0.9
Component: Events Version: 0.4
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by andrew)

It appears that dojo.event.connect() is never calling down to the DOM2/DOM3 method "addEventListener", and as a result, does not correctly subscribe to events in certain cases.

The one case that I know of is the following. In FireFox? 1.5 (and 2.0, I think), create an iframe:

  • iframe.contentWindow.document.designMode = "on";
  • dojo.event.connect( iframe.contentWindow, "onmousedown", function(){alert("hi!");} );

Clicking anywhere on that iframe should now cause an alert to pop up. It doesn't.

Note that since the Dojo RichText? widget is based on an iframe set up in exactly this way, this makes it impossible to do dynamic things with RichText? widget content (for example, a spellcheck).

Change History (4)

comment:1 Changed 15 years ago by andrew

Description: modified (diff)

comment:2 Changed 15 years ago by dylan

Milestone: 0.9

comment:3 Changed 15 years ago by Adam Peller

Component: GeneralEvents
Owner: changed from alex to sjmiles

Scott, is this still applicable?

comment:4 Changed 15 years ago by sjmiles

Resolution: fixed
Status: newclosed

The new dojo.connect reduces to addEventListener for node-ish targets which eliminates this problem.

Note: See TracTickets for help on using tickets.