Merge "Remove long_press when WebView lost window focus. Reset touch mode too." into froyo
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index ff1a685..1c2733c 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -4012,8 +4012,8 @@
     @Override
     protected void onDetachedFromWindow() {
         clearTextEntry(false);
-        super.onDetachedFromWindow();
         dismissZoomControl();
+        super.onDetachedFromWindow();
     }
 
     /**
@@ -4076,6 +4076,8 @@
             }
             mGotKeyDown = false;
             mShiftIsPressed = false;
+            mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS);
+            mTouchMode = TOUCH_DONE_MODE;
             if (mNativeClass != 0) {
                 nativeRecordButtons(false, false, true);
             }