Fix panelsnap on touch devices

See commit messages for details