* (
bug 31847) Fix positioning of WikiEditor 'header' insertions when selection is empty in IE 7/8
Follows up to the test cases added in
r100391. jquery.textSelection's getCaretPosition() for IE needs to focus the textarea first in order to get consistent results when there's an empty selection -- getSelection() which returns the text already does this.
Because focus had previously been stolen by the drop-down menus in WikiEditor's toolbar, the saveCursorAndScrollTop() was getting a bogus result from getCaretPosition, saving that, then restoring the bad selection (wiping out the original caret position) right before going ahead with the encapsulateText call.
Now seems to get the correct caret position, and also doesn't appear to interfere with selections.