Ticket #5081 (closed defect: fixed)

Opened 20 months ago

Last modified 10 months ago

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

Reported by: guest Owned by: doughays
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.0
Severity: normal Keywords: InlineEditBox, Editor, Dijit
Cc: bill, liucougar

Description (last modified by doughays) (diff)

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

5081.patch (2.4 kB) - added by doughays 12 months ago.
Editor patch to support InlineEditBox?

Change History

Changed 20 months ago by bill

  • owner set to bill
  • summary changed from editor="dijit.Editor" in dijit.InlineEditBox gives Error when clicking it to InlineEditBox: editor="dijit.Editor" doesn't work
  • milestone set to 1.1

Changed 19 months 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.

Changed 19 months ago by bill

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

Changed 19 months ago by guest

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

Changed 17 months ago by bill

  • owner changed from bill to doughays
  • milestone changed from 1.1 to 1.2

Changed 14 months ago by doughays

  • description modified (diff)

IBM #83982

Changed 12 months ago by doughays

Editor patch to support InlineEditBox?

Changed 12 months ago by doughays

  • 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.

Changed 12 months ago by doughays

  • status changed from new to closed
  • resolution set to fixed

(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.

Changed 12 months ago by doughays

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

Changed 10 months ago by doughays

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

Changed 10 months ago by bill

  • status changed from closed to reopened
  • resolution deleted

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

Changed 10 months 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

Changed 10 months ago by doughays

  • status changed from reopened to closed
  • resolution set to fixed

(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.

Changed 10 months 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.

Changed 10 months 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.