It seems that setCaretOffset should actually just be calling nsFocusManager::MoveFocus with the nsIFocusManager::MOVEFOCUS_CARET type in order to update the focus when the caret changes. This is what happens when a cursor key is pressed.
It seems that setCaretOffset should actually just be calling nsFocusManager: :MoveFocus with the nsIFocusManager ::MOVEFOCUS_ CARET type in order to update the focus when the caret changes. This is what happens when a cursor key is pressed.