Bug 798677, make sure events are fully handled in editor, r=ehsan
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Sun, 21 Oct 2012 15:35:47 +0300
changeset 111031 1c3e4cb1f754c79b52be1dc5b64f47c6f2cca45f
parent 111030 ae051b7f7e4e9363b5402c4ec0279ed67af6a75f
child 111032 49e26446d1e05188709de6a91c15e62c8a0f2fea
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersehsan
bugs798677
milestone19.0a1
Bug 798677, make sure events are fully handled in editor, r=ehsan
editor/libeditor/base/nsEditorEventListener.cpp
--- a/editor/libeditor/base/nsEditorEventListener.cpp
+++ b/editor/libeditor/base/nsEditorEventListener.cpp
@@ -279,16 +279,17 @@ NS_IMPL_ISUPPORTS1(nsEditorEventListener
 /**
  *  nsIDOMEventListener implementation
  */
 
 NS_IMETHODIMP
 nsEditorEventListener::HandleEvent(nsIDOMEvent* aEvent)
 {
   NS_ENSURE_TRUE(mEditor, NS_ERROR_NOT_AVAILABLE);
+  nsCOMPtr<nsIEditor> kungFuDeathGrip = mEditor;
 
   nsAutoString eventType;
   aEvent->GetType(eventType);
 
   nsCOMPtr<nsIDOMDragEvent> dragEvent = do_QueryInterface(aEvent);
   if (dragEvent) {
     if (eventType.EqualsLiteral("dragenter"))
       return DragEnter(dragEvent);