updated to include both focus and caret in tracker