Closed
Bug 54283
Opened 25 years ago
Closed 25 years ago
Adding javascript to a Composer document
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
VERIFIED
FIXED
M18
People
(Reporter: bijals, Assigned: akkzilla)
References
Details
(Keywords: dataloss, Whiteboard: [rtm+ NEED INFO][p:1])
Steps:
1) Open a new Composer document
2) Type "Last Updated: "
3) Click the INSERT -> HTML... menu item
4) Type or cut-n-paste the below javascript command
<script>document.write(document.lastModified);</script>
5) Click VIEW -> HTML SOURCE
(notice that you do not see the javascript inside the HTML source of this page
6) Type or cut-n-paste the below javascript command into the HTML SOURCE view
<script>document.write(document.lastModified);</script>
7) Click VIEW -> NORMAL and again VIEW -> HTML SOURCE
(notice that you still do not see the javascript inside the HTML source of this
page
8) Save page and open again and still not javascript
Actual Results: Javascript does not get included in page
Expected Results: Javascript in page where inserted
Build Date/Platform: 2000092608 using NT
Comment 1•25 years ago
|
||
note that if you bring in a file that has javascript and bring it in to
composer, the js renders until you do any edits in the file.
in mail, if the user attaches a file with js in it, it renders fine until the
reply is selected.
in both instances, the js is actually deleted from the file.
This is severe in the respect that numerous web pages use js for a multitude of
reasons, it should not be stripped when reply or select edit the file.
Comment 2•25 years ago
|
||
akk knows more about JS in composer, over to her.
Assignee: sfraser → akkana
| Assignee | ||
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 4•25 years ago
|
||
this needs to be corrected for rtm, there is dataloss and the user may not even
know that this has occurred.
| Assignee | ||
Comment 6•25 years ago
|
||
CreateContextualFragment is failing to create a valid fragment when it's passed
JS, but it doesn't return an error code saying so. Attempting to List() the
returned fragment gives a bunch of asserts:
###!!! ASSERTION: bad content: 'nsnull != mDocument', file nsGenericElement.cpp,
line 2938
Cc'ing vidur and rickg, the original authors of CreateContextualFragment, in
case they have pointers on where to start looking.
| Assignee | ||
Comment 7•25 years ago
|
||
The assertions are red herrings: turns out it always does this, even for valid
fragments.
But in the case of JS, the parser is just throwing everything away once it calls
Parse from inside ParseFragment. I could really use some parser help on this
one. Rick, Harish?
Fix for this is in bug 50965 ( patch version 1.3 ) - awaiting rtm++ status.
I meant,
Fix for this ( refer akkana's comment 2000-10-02 16:57 ) is in bug 50965 ( patch
version 1.3 ) - awaiting rtm++ status.
| Assignee | ||
Comment 10•25 years ago
|
||
Harish's fix does indeed fix this bug (thanks, Harish!) It's already awaiting
rtm++ and checkin. I'll keep this separate and mark a dependency rather than
duping since the symptoms are slightly different.
Depends on: 50965
| Assignee | ||
Comment 11•25 years ago
|
||
The depdant bug was fixed; marking this one fixed as well.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 13•25 years ago
|
||
Sorry for the spam! But apparently all these closed bugs need to have their
target milestones changed since M19 and M20 are going away. Since they're
allready closed, I'm choosing M18.
Target Milestone: M19 → M18
You need to log in
before you can comment on or make changes to this bug.
Description
•