Comment 56 for bug 602877

Revision history for this message
In , Fernando Herrera (fherrera) wrote :

Created attachment 494926
patch2

I have updated the patch moving the test case to test_text_caret.html and using eventQueue.

I also added code to remove all selections before moving the caret, it makes sense because that is what happens when moving it with the cursor (also is the way to get the caret-moved event fired: updating the selections).

Also, getCaretOffset was failing after a setCaretOffset because of the check "No caret if the focused node is not inside this DOM node and this DOM node is not inside of focused node". For that I'm just doing gLastFocusedNode = GetNode() when setting the caret, but I'm not sure about that solution.

Notice that tests are failing to check that link4 is still focused (MoveFocus will clear the focus).