JavaScript is disabled for iframes *inside* designMode iframes

RESOLVED DUPLICATE of bug 519928

Status

()

Core
Editor
RESOLVED DUPLICATE of bug 519928
12 years ago
8 years ago

People

(Reporter: sammyleong, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

12 years ago
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.

Updated

12 years ago
Summary: Javascript is disabled for iframe "A" when "A" is inside an editable iframe (designMode=on) → JavaScript is disabled for iframes *inside* designMode iframes

Comment 1

12 years ago
I confirm this.

Comment 2

11 years ago
Me too.
QA Contact: editor
Assignee: mozeditor → nobody

Comment 3

10 years ago
I confirm this too, and this is very annoy bug for me :(

Comment 4

10 years ago
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);

Updated

10 years ago
Blocks: 424615

Comment 5

9 years ago
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.

Updated

8 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 519928
You need to log in before you can comment on or make changes to this bug.