Closed
Bug 33208
Opened 25 years ago
Closed 25 years ago
Editor fails to initialize on pages with JS
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: akkzilla, Assigned: akkzilla)
References
()
Details
Attachments
(1 file)
1.58 KB,
patch
|
Details | Diff | Splinter Review |
Run mozilla -edit http://www.shallowsky.com/moon/hitchhiker.html
Do File->Quit
On linux, I see a JS error, which turns out to be because EditorGetDocument()
fails because the editor never got initialized. I'm working on tracking it down
further and find out why the editor doesn't get initialized.
Charley says he sees a crash on windows, apparently going through
s_ReportUncaughtException (which on Unix just prints out the error message).
Comment 1•25 years ago
|
||
The editor seemed to be initialized when I tested this morning.
Please attach a test file so we're all "on the same page."
Assignee | ||
Comment 2•25 years ago
|
||
Charley: see the URL and instructions I already added to this bug.
I've tracked it down further: the GetStyleContextFor call inside
nsEditor::IsPreformatted (when doing ReplaceNewlines while initializing the
plaintext rules) is failing.
Status: NEW → ASSIGNED
Target Milestone: --- → M15
Assignee | ||
Comment 3•25 years ago
|
||
Okay, here's the deal. JS code inside the body shows up as text nodes, and it
has no style context. So we can't depend on every node having a style context.
We can either treat those nodes as pre, or as non-pre, but in either case, we
should not return an error from IsPreFormatted, just true or false. In my tree,
I have it set to return false (i.e. these nodes are not preformatted), and now
the page initializes just fine and I can edit it.
Will check in the fix along with the disable-JS changes, when they're reviewed.
Will attach the diff for this part to this bug -- can you review it, and see if
it fixes your crash?
Assignee | ||
Comment 4•25 years ago
|
||
Assignee | ||
Comment 5•25 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•