Bugs 827969 & 827551 - gesture detector fixes