kogmbh/WebODF — pull request #310 by kevinlli (2014-01-14 09:59:56+00:00)
Title: Split paragraph improvement

At the moment, splitting at the end of the following paragraph

hello world|

will create a new paragraph like below

|

The cursor is moved out of the span due to empty span is not considered as a valid cursor position in the current design. this causes newly entered text are not formatted correctly.

Had a discussion with Phil. Seems making empty span a walkable position could leads some other undesired problems (eg. use keyboard to move cursor across multiple empty spans that next to each other). So chose to workaround it, by merging the current paragraph style and text style/direct cursor style into a new auto style, and apply it the newly created paragraph. This looks has less impact to other area and works pretty well.

The other alternative we had in mind is making the empty span a valid walkable position if it is only element in the paragraph apart from cursor and editinfo nodes. Since i'm not really familiar with the area, not sure if it is going to work. Any thoughts?