Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#2600 closed defect (invalid)

Editor 2 widget creation fails when attach node is followed by comments / whitespace

Reported by: [email protected] Owned by: liucougar
Priority: high Milestone:
Component: Editor Version: 0.4.2rc1
Keywords: Editor2 Cc:
Blocked By: Blocking:


I had the following code in a jsp:

<div id="richTextEditorContent"></div>

<!--div dojoType="Editor2" id="richTextEditorContent" shareToolbar="false" height="100" toolbarTemplatePath="../agent/include/response/ResponseEditorEmailToolbar.jsp"> </div-->

And the following code to create an Editor2 widget:

g_objMailEditor = dojo.widget.createWidget("Editor2", {height: 100, shareToolbar: false, toolbarTemplatePath: toolbarURI}, dojo.byId("richTextEditorContent"));

The widget creation was failing, so I traced the creation through to RichText?.js, in the _getContributingMargin() method.

The problem was arising from the method trying to calculate the margin between the <div> tag and the #text node, and causing the widget creation to fail with no errors or exceptions.

I removed the whitespace and comment and the widget build without a problem.

The version is 0.4.2rc2

Change History (4)

comment:1 Changed 15 years ago by Adam Peller

Component: WidgetsEditor
Milestone: 0.4.2
Owner: changed from cougar to liucougar
Version: 0.4.2rc1

comment:2 Changed 15 years ago by liucougar

can't reproduce this

could you provide a single html page to demo this bug?

comment:3 Changed 15 years ago by liucougar

Milestone: 0.4.2
Resolution: invalid
Status: newclosed

comment:4 Changed 15 years ago by (none)

Milestone: 0.4.2

Milestone 0.4.2 deleted

Note: See TracTickets for help on using tickets.