Closed Bug 326600 Opened 18 years ago Closed 14 years ago

JavaScript is disabled for iframes *inside* designMode iframes

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 519928

People

(Reporter: sammyleong, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

Create an iframe (outter-iframe) with designMode=on and add to its document, another iframe (inner-iframe).  Set inner-iframe's src to point to a page that has javascript.  The javascript inside inner-iframe is disabled.  I am not sure if this is intended by design.  But for what I am trying to accomplish, it'd be great if inner-iframe's javascript isn't disabled.  Perhaps providing an iframe attribute that specifies whether its javascript should be disabled would be great.

Reproducible: Always

Steps to Reproduce:
1. Create an iframe (outter-iframe) with designMode="on"
2. Insert into outter-iframe, another iframe (inner-iframe)
3. Set inner-iframe's src to some page that has javascript
4. The page displayed in inner-iframe has all javascript disabled.

Actual Results:  
The inner-iframe's javascript are disabled.

Expected Results:  
The inner-iframe's javascript should be enabled (or can be controlled via special attribute) whether it's placed inside a normal iframe or an editable iframe.
Summary: Javascript is disabled for iframe "A" when "A" is inside an editable iframe (designMode=on) → JavaScript is disabled for iframes *inside* designMode iframes
I confirm this.
Me too.
QA Contact: editor
Assignee: mozeditor → nobody
I confirm this too, and this is very annoy bug for me :(
I found that FF disable only JS events that set in html like 
<input type="button" onclick="alert(1);"> 
or from JS, like:
var o = document.createElement('input');
o.type = 'button';
o.onclick = function () {aleft(1);};

But if you use method addEventListener JS will be work.

So this example will works:
var o = document.createElement('input');
o.type = 'button';
o.addEventListener('click',function () {aleft(1);},true);
Blocks: 424615
I created some tests to demonstrate this at:
http://www.columbia.edu/~sky/bugs/firefox/intraIframeJS/

PVOID: I can't duplicate that javascript.  It seems even a document.write or an alert() will not get called.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.