Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#5081 closed defect (fixed)

InlineEditBox: editor="dijit.Editor" doesn't work

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.2
Component: Dijit Version: 1.0
Keywords: InlineEditBox, Editor, Dijit Cc: bill, liucougar
Blocked By: Blocking:

Description (last modified by Douglas Hays)

Browser: Firefox 2.0.0.9
Dojo Version: 1.0 (installed locally)
Error: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMNSHTMLDocument.designMode]

That error does not occur with other types of editors. I can use the dijit.Editor outside of the InlineEditBox? without problems. A short note on the InlineEditBox?-Site in the doc suggest it should work. I searched the site and googled for a while but found no solution, let alone mention of that problem.

That's how I did it (produces the error every time on my system):

<p dojoType="dijit.InlineEditBox" editor="dijit.Editor">
    edit me
</p>

It doesn't matter if I add renderAsHtml="true" or anything.

Attachments (1)

5081.patch (2.4 KB) - added by Douglas Hays 11 years ago.
Editor patch to support InlineEditBox?

Download all attachments as: .zip

Change History (16)

comment:1 Changed 12 years ago by bill

Milestone: 1.1
Owner: set to bill
Summary: editor="dijit.Editor" in dijit.InlineEditBox gives Error when clicking itInlineEditBox: editor="dijit.Editor" doesn't work

comment:2 Changed 12 years ago by bill

FYI, I started to look at this one, but it might be a bit difficult to fix. Programmatic Editor creation does work (see [11801]), but as you said InlineEditBox? fails. For one thing, Editor doesn't have a focusNode attribute, so we crash there. I also think the FF2 iframe though will be problematic, especially w.r.t. copying over the source node's style to the editor.

comment:3 Changed 12 years ago by bill

(In [11802]) Test case for InlineEditBox? on dijit.Editor, which doesn't work yet. Refs #5081.

comment:4 Changed 12 years ago by guest

Just FYI, it works nice and without errors on Safari 3 (rendering with webkit).

comment:5 Changed 12 years ago by bill

Milestone: 1.11.2
Owner: changed from bill to Douglas Hays

comment:6 Changed 12 years ago by Douglas Hays

Description: modified (diff)

IBM #83982

Changed 11 years ago by Douglas Hays

Attachment: 5081.patch added

Editor patch to support InlineEditBox?

comment:7 Changed 11 years ago by Douglas Hays

Cc: bill liucougar added

The patch needs to be reviewed for regressions. I added a focusNode to RichText?.js and changed the InlineEditBox? template to use a DIV instead of INPUT tag as the srcNodeRef default element. I changed the test to be autosave since Editor does not (yet?) support intermediate onChange notifications and thus the Save button in InlineEditBox? won't enable until a blur event is received in RichText?. This function would be handled by #5891.

comment:8 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [14283]) Fixes #5081. Added focusNode to RichText? editor and changed the InlineEditBox? widget template to use a div instead of an input tag. Changed the inline test to be autosave=true since Editor currently only fires onChange events after a blur.

comment:9 Changed 11 years ago by Douglas Hays

(In [14376]) References #5081. Add support for InlineEditBox? to use Editor in !autoSave mode.

comment:10 Changed 11 years ago by Douglas Hays

(In [15141]) References #5081, #7549. Readd focusNode to Editor for InlineEditBox? to use.

comment:11 Changed 11 years ago by bill

Resolution: fixed
Status: closedreopened

This isn't working on IE, see #7613.

comment:12 Changed 11 years ago by bill

(In [15175]) Since the Editor may output <p> tags, and nested <p> tags are illegal, declare the InlineEditBox? with a <div>.

This makes IE sort-of work although the font looks terrible because the 75% is applied multiple times so it's really small. (Copying the font-size as a computed-style isn't working well; it copies "75% "rather than "12pt".)

Refs #5081

comment:13 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

(In [15177]) Fixes #5081. Added specific font-size to the Editor test so IE doesn't apply the relative size over and over. Changed Editor to apply user font styling to the iframe body style.

comment:14 Changed 11 years ago by bill

FYI, turns out the font size problem is unrelated to InlineEditBox and is a regression from [14525], see #7636 and original ticket #6755.

comment:15 Changed 11 years ago by bill

(In [15230]) remove workaround code added in [15177], not needed after [15229]. refs #5081

Note: See TracTickets for help on using tickets.