Here is my OpenWYSIWYG solution for moving the cursor to the specified position in FireFox after setting the focus on the editor:
focusEditor: function (n) { var editor = this.getEditorWindow(n); if (WYSIWYG_Core.isFF) { editor.document.body.focus(); try { var sel = this.getSelection(n); var range = sel.getRangeAt(0); range.setStart(sel.anchorNode.childNodes[0], 1); range.setEnd(sel.anchorNode.childNodes[0], 0); sel.addRange(range); } catch (err) {
source share