Last modified: 2012-12-06 00:58:41 UTC
Firefox naturally leaves a <br _moz_dirty> when the contents of a paragraph has been deleted. There are 2 cases, deleting text in a paragraph and deleting text in a paragraph in a list item. In the case of a paragraph NOT within a list item, the DOM is: <p><br _moz_dirty></p>. ve.ce.TextNode onUpdate cleans the parent, removing the <br>. In the case of a paragraph WITHIN a list item, the DOM is: <li><p></p><br _moz_dirty></li>. Cleaning the parent doesn't remove the br, but parent.parent does. Maybe this needs to traverse up to the highest splittable node? In both cases the focus does not return to the slug because the surface is locked, preventing showSelection (this is in the onChange method).
I already found a few slightly different ways to solve this problem. After I will choose the best one I will update this ticket and send it for review to gerrit.
Fixed here: https://gerrit.wikimedia.org/r/#/c/37162/