Wysiwyg: When setting editor content to an empty paragraph, cursor is positioned after <br> and input ends up on second line
|Reported by:||arne||Owned by:|
Go to demo page:
- Execute the following code (in Firebug). (If it's not reproduced on the first try, try a few more times)
- Now input some text.
- Observe that text ends up on the second line (after the br-tag).
This is caused by the onSelectionChangeFixBody function in the wysiwyg plugin, where Range::moveToElementEditEnd is called for the empty paragraph. Cursor then ends up after the br element.
Expected behavior : When paragraph is empty (contains br-tag), Range::moveToElementEditStart should be called.
Tested in Firefox 3.6.13, WinXP, CK version 3.4.2