Bug 1029943 - Hide selection carets when blurred. r=roc

This commit is contained in:
Morris Tseng 2014-08-20 19:41:00 -04:00
parent 8fdbf10536
commit b51583b8c3

View File

@ -35,6 +35,7 @@
#include "nsIObjectFrame.h"
#include "nsBindingManager.h"
#include "nsStyleCoord.h"
#include "SelectionCarets.h"
#include "mozilla/ContentEvents.h"
#include "mozilla/dom/Element.h"
@ -1545,6 +1546,11 @@ nsFocusManager::Blur(nsPIDOMWindow* aWindowToClear,
return true;
}
nsRefPtr<SelectionCarets> selectionCarets = presShell->GetSelectionCarets();
if (selectionCarets) {
selectionCarets->SetVisibility(false);
}
bool clearFirstBlurEvent = false;
if (!mFirstBlurEvent) {
mFirstBlurEvent = content;