Quick'n'dirty patch to address touchscreen issues

The code taken from here:

https://github.com/twbs/bootstrap/pull/5067#issuecomment-8604323