Make sure you have caret browsing switched on. Use the Firefox options, or F7 to toggle caret browsing on/off.
Click a number to set the caret to that offset in the <pre> text node.
Line Break
Offset 5 should select between the newline character and the letter "B". i.e. at the start of the second line. This correct position is occasionally selected, but most of the time offset 5 moves the cursor to the end of the first line.
Using the left and right arrow keys always moves the caret correctly.
Using the mouse to set the cursor position in the "pre" text always works correctly.
Click on any line, press the Home key to move the caret to the start of the line. Clicking 5 then moves the caret correctly to before "B". Similarly, pressing PageUp, PageDown or left arrow key before clicking 5 also results in the caret being correctly set to before "B". However, pressing the Home, Left, Up or Down arrow keys, and then clicking 5 leaves the caret at the end of the first line.
After a page refresh, then immediately clicking 5 the caret is always incorrectly placed at the end of the first line.
This bug has now been resolved. Refer to the bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=334256