Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#662 closed defect (fixed)

RichText.js can throw error if lastChild is a text node

Reported by: [email protected] Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.2
Keywords: Cc:
Blocked By: Blocking:


See line 376.

if (tmpContent.firstChild && { = 
        this._firstChildContributingMargin+"px"; = 

There's a check for firstStyle supporting the style attribute, but there's no similar check for the lastChild.

Without this fix, RichText? cannot edit html content (i.e. stored in a DB) which ends in a text node, so '<b>Hello</b> World' breaks, while

'<p><b>Hello</b> World</p>' works.

Attachments (1)

RichText.patch (553 bytes) - added by [email protected] 16 years ago.
Fix for this issue

Download all attachments as: .zip

Change History (3)

Changed 16 years ago by [email protected]

Attachment: RichText.patch added

Fix for this issue

comment:1 Changed 16 years ago by alex

Resolution: fixed
Status: newclosed

looks to have been already fixed, but [3912] should seal the deal.

comment:2 Changed 15 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.