From 80ae1b2f26f433849459f7486401a64f140acc68 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Wed, 16 Jul 2014 23:06:36 -0400 Subject: [PATCH] Bug 995475 - Clear the active element on touch end, if the touch wasn't a click. r=botond --- gfx/layers/apz/util/ActiveElementManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gfx/layers/apz/util/ActiveElementManager.cpp b/gfx/layers/apz/util/ActiveElementManager.cpp index 7cf5b970172b..6afb4e057fa7 100644 --- a/gfx/layers/apz/util/ActiveElementManager.cpp +++ b/gfx/layers/apz/util/ActiveElementManager.cpp @@ -118,6 +118,11 @@ ActiveElementManager::HandleTouchEnd(bool aWasClick) CancelTask(); if (aWasClick) { SetActive(mTarget); + } else { + // We might reach here if mCanBePan was false on touch-start and + // so we set the element active right away. Now it turns out the + // action was not a click so we need to reset the active element. + ResetActive(); } ResetTouchBlockState();