зеркало из https://github.com/mozilla/pjs.git
Bug 201242: When minimize and then restore, two carets appear in a mail compose window
Patch by bryner and me r=bryner sr=jst a=sspitzer
This commit is contained in:
Родитель
893f0738a2
Коммит
f34440c5b9
|
@ -105,7 +105,11 @@ nsFocusController::GetFocusedWindow(nsIDOMWindowInternal** aWindow)
|
|||
NS_IMETHODIMP
|
||||
nsFocusController::SetFocusedElement(nsIDOMElement* aElement)
|
||||
{
|
||||
mPreviousElement = mCurrentElement;
|
||||
if (mCurrentElement)
|
||||
mPreviousElement = mCurrentElement;
|
||||
else if (aElement)
|
||||
mPreviousElement = aElement;
|
||||
|
||||
mCurrentElement = aElement;
|
||||
|
||||
if (!mSuppressFocus) {
|
||||
|
@ -309,8 +313,10 @@ nsFocusController::Focus(nsIDOMEvent* aEvent)
|
|||
nsCOMPtr<nsIDOMDocument> windowDoc;
|
||||
mCurrentWindow->GetDocument(getter_AddRefs(windowDoc));
|
||||
if (ownerDoc != windowDoc)
|
||||
mCurrentElement = nsnull;
|
||||
mCurrentElement = mPreviousElement = nsnull;
|
||||
}
|
||||
else
|
||||
mPreviousElement = nsnull;
|
||||
|
||||
if (!mCurrentElement)
|
||||
UpdateCommands(NS_LITERAL_STRING("focus"));
|
||||
|
|
Загрузка…
Ссылка в новой задаче