This is follow up of {T121092}
When enter key is pressed inside a content editable, browser behavior differs:
|Browser|Inserts|
| IE | p|
|Google Chrome | div |
| Firefox | br |
This bug happens if the inserted tag is a section tag. ie p or div. If you do this in Firefox, restoring works fine since it is an br inside paragraph,
Your patch handles the cases of section tags correctly. I tested.
But, having a <div> tag in HTML causes Parsoid to insert the <div> tag in the generated wiki text. And the article published will not have that paragraph break. So the users intention of paragraph break is not accompilished.
HTML
```
<p>first <div>second </div></p>
```
Wikitext generated:
```
first <div>second </div>
```
If the br tag appears inside the HTML , generated wiki text will have paragraph breaks and hence it satisfies users intention.
HTML
```
<p>first <br>second<br><br>third</p>
```
```
first
second
third
```
Ideally, on enter keys, we should close the <p> and insert a new <p> by disallowing both div, and br creation inside <p> tag