Page MenuHomePhabricator

VisualEditor: Emptying paragraph in Firefox with backspace adds <br _moz_dirty>
Closed, ResolvedPublic

Description

Author: orbit

Description:
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).


Version: unspecified
Severity: normal

Details

Reference
bz41223

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:03 AM
bzimport set Reference to bz41223.
Inez added a comment.Oct 24 2012, 7:43 PM

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.

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 28 2016, 6:12 PM