Closed
Bug 71702
Opened 24 years ago
Closed 24 years ago
[plaintext] Plaintext editor bugs
Categories
(Core :: DOM: Editor, defect, P3)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: cmanske, Assigned: cmanske)
References
Details
Attachments
(6 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
Most of the plaintext bugs will be fixed at the same time, so using this
to attach diffs and track existing bugs.
Assignee | ||
Comment 1•24 years ago
|
||
changing platform, etc.
Status: NEW → ASSIGNED
Hardware: PC → All
Target Milestone: --- → mozilla0.9
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
Assignee | ||
Comment 4•24 years ago
|
||
New patch eliminates need to duplicate strings for Insert menu in editor.dtd.
It also includes cleanup of unused duplicated strings between editor.dtd and
editorOverlay.dtd.
Whiteboard: FIX IN HAND need r=, sr=
Comment 5•24 years ago
|
||
These things need to be fixed or addressed:
1) in several places there is code like this:
var saveHTML = window.editorShell.editorType == "html" ||
editorShell.editorType == "htmlmail";
var result = window.editorShell.saveDocument(doSaveAs, false, saveHTML ? "text/
html" : "text/plain");
a) inconsistent use of window.editorShell vs editorShell.
be consistent
b) saveDocument call should not have the comparison, instead pass it a local
variable "flavor" This could be done in 3 lines or two if you remove the
need for the local variable "saveHTML"
2) you added a comment: "editor.xul has these - do we need them?"
a) What is the answer to this question?
Apparently plain text editor doesn't need them.
b) What about html editor; does it need them?
c) Is there a bug filed to investigate/track this issue?
3) in editor.js, you have default between several cases.
I prefer default to be at the end.
Is there some reason you have it in the middle?
I'd like to see a new diff with this changes before I give an r=
Assignee | ||
Comment 6•24 years ago
|
||
Assignee | ||
Comment 7•24 years ago
|
||
Charley thanks for addressing most of brade's concerns. If you checkin the
comments brade points out in #2 of her list, we should file a bug so that we
don't forget about investigating it.
Please fix the indentation for this portion of your diff:
+ while ( enumerator.hasMoreElements() )
+ {
+ var tempWindow = enumerator.getNext();
+ if (tempWindow != window && ("editorShell" in tempWindow) &&
tempWindow.editorShell)
+ {
+ var type = tempWindow.editorShell.editorType;
+ if (type == "html" || type == "text" || type == "htmlmail")
+ {
+ tempWindow.InsertCharWindow = window.InsertCharWindow;
+ window.InsertCharWindow = null;
+
+ tempWindow.InsertCharWindow.editorShell = tempWindow.editorShell;
+ tempWindow.InsertCharWindow.opener = tempWindow;
+ return;
+ }
I see that your patch fixes up the View menu, but the "My Sidebar" menu item is
still broken. The other items work though.
Other bugs I noticed, but probably existed before your patch:
1. The "New" button creates a new HTML Composer, it should create a new
PlainText editor.
2. If you have not modified the current PlainText document window, the "Open"
button will allow both text and html files to be loaded into the current
PlainText editor ... it should only allow plain text files.
3. If you have a modified PlainText document window, the "Open" button will
launch a new HTML Composer even if you've opened a text file, shouldn't it
launch a new PlainText editor?
Assignee | ||
Comment 9•24 years ago
|
||
Yes, I know about the "Open" and "New" problems. Since I'm not sure how this
is going to be exposed (if at all, it's still just on Debug menu), these issues
need some discussion. This patch is only for the 4 "depends on" bugs noted here.
Assignee | ||
Comment 10•24 years ago
|
||
Comment 11•24 years ago
|
||
sr=kin
Comment 13•24 years ago
|
||
I notice these issues as well (is there a new bug for these issues?):
* save is always enabled even though no typing in document or you just saved
* I don't think the Recent Files menu should be there (or if so, it should only
have text files)
* When choosing "save as charset" I'm prompted for a page title (!)
* Save As Charset default file name is *.html (rather than *.txt)
* Browse Page really shouldn't be an option in a plain text editor.
* if I type some text and then choose File | Close, I am prompted to save *.html
* Print has a dropdown (or so it appears) but there is no menu
* The Character Coding menu is disabled (intentional?) (or at least it was but
not it's enabled; something strange going on here!)
Comment 14•24 years ago
|
||
Also, if you click the close box to dismiss the window, you are *not* prompted to
save (and you lose anything you type)!
Assignee | ||
Comment 15•24 years ago
|
||
The attached fixes address the 4 dependent bugs (or very closely-related
issues).
Kathy noted:
* save is always enabled even though no typing in document or you just saved
Can't avoid that because of simple use of "textarea" If we don't enable it,
you can't save at all.
* I don't think the Recent Files menu should be there (or if so, it should only
have text files)
I disagree
* When choosing "save as charset" I'm prompted for a page title (!)
File a separate bug.
* Save As Charset default file name is *.html (rather than *.txt)
File a separate bug.
* Browse Page really shouldn't be an option in a plain text editor.
I will fix that.
* if I type some text and then choose File | Close, I am prompted to save *.html
I will fix that.
* Print has a dropdown (or so it appears) but there is no menu
file a separate bug
* The Character Coding menu is disabled (intentional?) (or at least it was but
not it's enabled; something strange going on here!)
File a separate bug.
Assignee | ||
Comment 16•24 years ago
|
||
Yea, I see the "Close" problem. That's important enough to fix now.
Will investigate.
Comment 17•24 years ago
|
||
I have filed the 4 issues Kathy mentioned as separate bugs = 73676, 73675,
73674 and 73672
Assignee | ||
Comment 18•24 years ago
|
||
Assignee | ||
Comment 19•24 years ago
|
||
Changes relative to previous patch:
I added another global window param (gDefaultSaveMimeType) that is set in
common code that everyone calls. This is used by the save methods so they don't
have to repeat testing for "editorType" and everyone who tries to save gets
the right mime type.
The prompt to save file when closing window was fixed by adding
onclose="return EditorCanClose()"
to plaintext window.
Comment 20•24 years ago
|
||
r=brade
OS: Windows NT → All
Summary: [plaintext] Plaintext editor tracking bug → [plaintext] Plaintext editor bugs
Whiteboard: FIX IN HAND need r=, sr= → FIX IN HAND
Assignee | ||
Comment 21•24 years ago
|
||
All current dependent bugs are fixed. All other problems in plain text
discussed in this bug have bugs filed.
File new bugs for any other plaintext editor issues.
closing this tracking bug - verify the dependent bugs and reopen them if
necessary, but it shouldn't be necessary to ever open this one again.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•