Closed Bug 71702 Opened 24 years ago Closed 24 years ago

[plaintext] Plaintext editor bugs

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: cmanske, Assigned: cmanske)

References

Details

Attachments

(6 files)

Most of the plaintext bugs will be fixed at the same time, so using this to attach diffs and track existing bugs.
changing platform, etc.
Status: NEW → ASSIGNED
Hardware: PC → All
Target Milestone: --- → mozilla0.9
Depends on: 69544
Blocks: 69540
Depends on: 69541
Depends on: 69547
No longer blocks: 69540
Depends on: 69540
Attached patch Updated patch (deleted) — Splinter Review
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=
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=
Attached patch Updated patch (deleted) — Splinter Review
Attached patch Updated patch (deleted) — Splinter Review
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?
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.
sr=kin
P3 priority
Priority: -- → P3
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!)
Also, if you click the close box to dismiss the window, you are *not* prompted to save (and you lose anything you type)!
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.
Yea, I see the "Close" problem. That's important enough to fix now. Will investigate.
No longer depends on: 69541
I have filed the 4 issues Kathy mentioned as separate bugs = 73676, 73675, 73674 and 73672
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.
Depends on: 73674
Depends on: 69536
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
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
Removing "FIX IN HAND" status.
Whiteboard: FIX IN HAND
Verified Dependent bugs on 8-27 build
Status: RESOLVED → VERIFIED
Depends on: 451959
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: