Fixes the failure-to-focus bug on mobile devices.
Manual merge from develop.