Closed Bug 180303 Opened 22 years ago Closed 22 years ago

Insert HTML broken

Categories

(Core :: DOM: Editor, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.3alpha

People

(Reporter: neil, Assigned: cmanske)

References

Details

(Keywords: regression)

Attachments

(3 files, 3 obsolete files)

nsIController.doCommand("cmd_insertHTML") throws NS_ERROR_NOT_IMPLEMENTED
This is fallout from bug 174439.
Keywords: regression
*** Bug 180100 has been marked as a duplicate of this bug. ***
Attached patch fix v1 (obsolete) — Splinter Review
Also contains some minor optimizations for the JS command controller
Attachment #106418 - Flags: superreview?(sfraser)
Attachment #106418 - Flags: review?(brade)
Attached patch fix v2 (obsolete) — Splinter Review
Update, including necessary change to make sure controller ID starts at 1.
Attachment #106418 - Attachment is obsolete: true
-  commandManager.registerCommand("cmd_insertHTML",    nsInsertHTMLCommand);
+  commandManager.registerCommand("cmd_insertHTMLDlg", nsInsertHTMLDlgCommand);

Please rename cmd_insertHTMLDlg to something more comprehensible.

Before we go having special commands that bring up UI, I'd like us to come up
with a policy of when commands can trigger UI. We have to address this for Midas
and emebedders sonner or later.
I have fix -- taking bug
Assignee: brade → cmanske
Whiteboard: [FIX IN HAND] need r=,sr=
Target Milestone: --- → mozilla1.3alpha
Comment on attachment 106443 [details] [diff] [review]
fix v2

I don't understand the controller changes.  I think those should be part of
another patch/bug.  That will help if any regressions are caused by the
controller changes (less to back out and clearer what the original problem
is/was.  In particular, I don't understand this block:
+  // Don't need to do this if already done
+  if (gComposerWindowControllerID)
+    return;
Why isn't there a similar optimization for gComposerJSCommandControllerID?

I don't think cmd_insertHTML should be in this list:
    || commandID == "cmd_insertHTML"
+   || commandID == "cmd_insertHTMLDlg"
Severity: normal → major
OS: Windows 95 → All
Hardware: PC → All
Attached patch fix v3 (obsolete) — Splinter Review
I'll put the controller changes in a different bug.
Attachment #106443 - Attachment is obsolete: true
Attachment #106724 - Flags: superreview?(sfraser)
Attachment #106724 - Flags: review?(akkana)
Comment on attachment 106724 [details] [diff] [review]
fix v3

noUIStateUpdateNeeded still refers to cmd_insertHTML.  Isn't that command
nonexistant now?

cmanske says that whole switch table is going away as part of some other bug,
so it's not a big deal, but just in case that one gets delayed, it might be
nice to change the instance as part of this checkin (if you do that, no need to
make another patch).
Attachment #106724 - Flags: review?(akkana) → review+
What's the deal with commands that bring up UI? Should we look at the midas APIs
to decide how to do this? Maybe it should just be a param (or lack of params)
that indicates that UI should be thrown?
I wonder if we should be consistent and use "Properties" instead of "Dialog"
like cmd_objectProperties and other commands already have?  For this particular
bug, we should do something to fix the regression.  A new bug should be filed to
address the general issue of "UI" param for all appropriate commands.

Akkana points out:
>noUIStateUpdateNeeded still refers to cmd_insertHTML.  Isn't that command
>nonexistant now?
She is partially right, cmd_insertHTML shouldn't appear in that list.  The
command does exist but it's in C++ and shouldn't be in that list.  (The reason
we have a problem today is that there are two commands with identical string and
we are finding the wrong one.)
Attachment #106418 - Flags: superreview?(sfraser) → superreview-
Attachment #106724 - Flags: superreview?(sfraser) → superreview?(kin)
Attachment #106418 - Flags: review?(brade) → review-
Comment on attachment 106724 [details] [diff] [review]
fix v3

sr=kin@netscape.com
Attachment #106724 - Flags: superreview?(kin) → superreview+
checked into 1.3a trunk
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Whiteboard: [FIX IN HAND] need r=,sr=
Not working for me in trunk build from yesterday morning.
However it does work for me if I make this modification:

Index: editor/ui/composer/content/editorOverlay.xul
===================================================================
RCS file: /cvsroot/mozilla/editor/ui/composer/content/editorOverlay.xul,v
retrieving revision 1.222
diff -r1.222 editorOverlay.xul
123c123
<     <command id="cmd_insertHTMLWithDialog"
oncommand="goDoCommand('cmd_insertHTMLDlg')"  label="&insertHTMLCmd.label;"/>
---
>     <command id="cmd_insertHTMLWithDialog"
oncommand="goDoCommand('cmd_insertHTMLWithDialog')"  label="&insertHTMLCmd.label;"/>
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oops! That change is in the "fix v3". Simply forgot to check that file in.
Attachment #106724 - Flags: approval1.3a?
Flags: blocking1.3a?
*** Bug 183699 has been marked as a duplicate of this bug. ***
Comment on attachment 106724 [details] [diff] [review]
fix v3

a=asa for checkin to 1.3a
Attachment #106724 - Flags: approval1.3a? → approval1.3a+
editorOverlay.xul checked into 1.3a trunk.
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Flags: blocking1.3a?
I think this is still broken in mail compose; mail compose is not using the
correct command string in 2 places
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
doh!
Attachment #106724 - Attachment is obsolete: true
Attachment #109030 - Flags: superreview?(kin)
Attachment #109030 - Flags: review?(brade)
Whiteboard: [FIX IN HAND]need r=,sr=
Comment on attachment 109030 [details] [diff] [review]
fix for mail compose v1

sr=kin@netscape.com
Attachment #109030 - Flags: superreview?(kin) → superreview+
Attachment #109030 - Flags: review?(brade) → review+
checked into 1.3b trunk
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Whiteboard: [FIX IN HAND]need r=,sr=
I think some extra changes got checked in by mistake :-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm just backing out the added ()s, not the whitespace changes, so the patch
isn't quite identical to the previous diff.
Attachment #109821 - Flags: superreview?(kin)
Attachment #109821 - Flags: review?(cmanske)
Comment on attachment 109821 [details] [diff] [review]
Back out setTimeout changes

doh!
Attachment #109821 - Flags: review?(cmanske) → review+
Comment on attachment 109821 [details] [diff] [review]
Back out setTimeout changes

sr=kin@netscape.com
Attachment #109821 - Flags: superreview?(kin) → superreview+
checked into 1.3b trunk
Status: REOPENED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
vrfy'd fixed with 2003.04.10 comm bits.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: