Created attachment 727578 [details] [diff] [review] testcase Filing a bug under layout since it's nsIFrame::PeekOffset problem. But it's better to illustrate as a keyboard issue. Navigation by words is inconsistent in editable container when it contains <br> or \n character as separator. For example: <pre> <div contentEditable="true">oneword two words </div> <div contentEditable="true">oneword<br><br>two words</div> </pre> Windows: If you set up the caret at the beginning of text then "next word" is empty line in #1 case and "two" in #2 case. Both cases work the same in Chrome. IE has totally different behavior (but consistent): it includes end of each line between words. If PeekOffset is fixed then it seems keyboard behavior will be the same as Chrome one which should be fine. Mac works the same way (it moves to the end of word) not depending on markup and works same way in Chrome/Safari.
Created attachment 729495 [details] [diff] [review] patch test_movement_by_words.html "Set .rc to <b>'</b>quiz'" was corrected previously: 6 stops, after (from left to right) "'" of b, after "to", before "to", before "rc", after "Set", before "Set" now: 4 stops, after (from left to right) "'" of b, before "to", before "rc", before "Set" (btw behavior is the same in Chrome)