improve focus handling on mobiles. fixes #1344