JAL-2491 Make it work with cursor movement