[BUG #7887] Improved touch device detection