From:  wastedScal <wastedscal@scarlet.be>
Date:  03 Apr 2008 04:41:55 Hong Kong Time
Newsgroup:  news.mozilla.org/netscape.public.mozilla.editor
Subject:  

designMode="on" on iframe - event handler on radio/checkbox input type not working. Workaround?

NNTP-Posting-Host:  62.235.205.116

     Hello everyone;
I'm runing into an issue eher and can't find out how to fix it.

I have an iframe inside a page, this iframe has the designMode property 
set to "on".
I assign event handlers to the contentWindow using such script:
document.getElementById("ElementId").contentWindow.addEventListener("click", 
myEventHandler, true);

In the myEventHandler function I do:
var ClickedElement =  mEvent.target;
alert(ClickedElement.nodeName);

This work for many elements that are inside my iframe page (img, span, 
div, h1, etc) but fails for 2 tags (I haven't encounter the problem with 
other element but who knows) which are the radio and checkbox input types.
I tried to set a focus, click, select in the input tag itself but the 
event just isn't being triggered at all.

An example is available here: http://pascalc.nougen.com/stuffs/ff_test.html
I tried many ways to assign a click event handler to the 
radio/checkboxes but I can't get any to work. I also did try to use the 
preventDefault() method of the event but with no luck, maybe I did it a 
wrong way?

Anyway, I'm stuck. I need to be able to know that one of those 2 
elements is clicked/focused/selected in the editor, any idea?

Thanks

Scal