#662 closed defect (fixed)
RichText.js can throw error if lastChild is a text node
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | General | Version: | 0.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
See http://svn.dojotoolkit.org/dojo/trunk/src/widget/RichText.js line 376.
if (tmpContent.firstChild && tmpContent.firstChild.style) { tmpContent.firstChild.style.marginTop = this._firstChildContributingMargin+"px"; tmpContent.lastChild.style.marginBottom = this._lastChildContributingMargin+"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)
Change History (3)
Changed 16 years ago by
Attachment: | RichText.patch added |
---|
comment:1 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
looks to have been already fixed, but [3912] should seal the deal.
Note: See
TracTickets for help on using
tickets.
Fix for this issue