What happens is the file never completes loading in the editor. All the content is there, but the throbber is still spinning. This means there is no nsIHTMLEditor created for the document. This is probably why the NS_NO_INTERFACE error keeps getting thrown from nsEditorShell. After more digging, if the IFRAME is commented out, then the page loads and is editable. Code snippet to use for testing: <html> <head><title>test</title></head> <body> <p>Here is an iframe:</p> <iframe frameborder=1 width=20 height=20>IFRAME element</iframe><br> </body> </html>
I believe iframes are out... but I may be wrong. Nisheeth are these handled in the DOM?
The HTML spec says (sec. 16.5): The information to be inserted inline is designated by the src attribute of this element. The contents of the IFRAME element, on the other hand, should only be displayed by user agents that do not support frames or are configured not to display frames. IFRAMEs currently work fine, but this bug exists whether the IFRAME has a SRC attribute or not. However, the *contents* of the IFRAME do become editable. Attaching a testcase. TO REPRODUCE: * load attached testcase * Go to "File | Edit Page" ACTUAL RESULTS: * The contents of the iframe are editable, the page is not. EXPECTED RESULTS: * The page should be editable. The contents of the iframe should not (?). This seems more like an editor bug than a Layout bug. (Note that I never saw the throbber keep spinning. Maybe that is fixed.)
Beth, the page loads fine now, but as David says, instead of the page becoming editable, the IFRAME inside the page becomes editable. This seems like a editor specific issue, so re-assigning this back to you.
asking Simon if he has any ideas as to why the page becomes uneditable, but the IFRAME is editable.
Yes, I do. We'll make the editor on the last IFRAME that is loaded, blowing away previous editors in the process. Fixing this requires some thought. Testcase, please?
Actually, I think fixing this will requires at least some of the work for embedding to be complete (bug 35639).
Simon -- tests cases are already in here, see the sample code in the file and David Baron attached a test case
setting to m18
cc: valeski, dougt for embedding info. To fix this bug, I need to be able to hang an editor off a docShell (or equivalent), which leads us down the embedding path. Have you guys started down that path yet?
added correctness keyword and bringing it back to m19
moving to future per review with bij and beppe
*** Bug 60869 has been marked as a duplicate of this bug. ***
In a recent build I now see this: page loads fine but it not editable; clicking on links in the iframe load those pages
nsbeta1+ editorbase- for now but this is subject to change later
duping *** This bug has been marked as a duplicate of 14156 ***