Opened 11 years ago
Closed 11 years ago
#10854 closed defect (fixed)
Pretty Print causes content to disappear
Reported by: | roaming | Owned by: | Jared Jurkiewicz |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Editor | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
How to reproduce:
- start with empty editor with prettyprint enabled
- type a single word (do not hit space or return, although this varies by browser)
- click on View Source icon
The view source box will be empty, and upon return from View Source, the Editor will be empty. The behavior is slightly different between browsers. In Firefox 3.6 if you type a space or hit return after the word, there is a br tag added and content does not disappear. In Webkit-based browsers (Safari, Chrome - latest versions), typing a space doesn't help. You have to hit return.
(Probably unrelated, but I also noticed that Webkit-based browsers wrap the br tag between div tags. This doesn't happen in Firefox.)
I'm not attaching a test case because this can be easily reproduced using the dojox/editor/tests/editorPrettyPrint.html page (you have to clear the existing content in View Source mode, and then enter new content).
Change History (4)
comment:1 Changed 11 years ago by
Component: | General → Editor |
---|---|
Owner: | changed from anonymous to Jared Jurkiewicz |
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|
comment:4 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
The BR is unrelated.
The issue turned out to be a trivial one. When there was trailing text content (no ending tag), the content would be dropped because it wasn't formatted and joined into the array at the end. Minor fix. Working on it now, should have it fixed in 10 minutes or so.