Opened 10 years ago
Closed 6 years ago
#31219 closed defect (bug) (worksforme)
Divs get collapsed always since nbsp is not added.
Reported by: | programmin | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.1 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
Here's a test you can see in most wp setups:
Start with a post that has:
<div>type here</div>
Press enter a few times, type more text. Now you have move divs.
Save and view, and you'll see the actual page has no enters, as it didn't replace the bogus br tags with &nbsp.
Change History (4)
This ticket was mentioned in Slack in #core by jorbin. View the logs.
10 years ago
Note: See
TracTickets for help on using
tickets.
To clarify the original bug report a bit more:
<div>foo bar</div>
<div></div>
elements have been createdThe suggestion made by programmin (awesome screenname, btw) is that these empty
<div>
elements ought to have some content in them so that they're not removed:<div> </div>
. The consensus in the bug scrub was that this seems like very odd behavior.So, the question is: what is the expected behavior here? Should we be creating the dummy divs? Should we be creating
<p>
s instead (and would that cause the same problem)? Maybe<br />
elements?