Cannot apply action for element at caret