зеркало из https://github.com/mozilla/gecko-dev.git
Bug 190838. Status bar repeatedly says 'find stopped'. r=brade, sr=jst, a=asa
This commit is contained in:
Родитель
b93cd96532
Коммит
063396801a
|
@ -636,7 +636,7 @@ nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
|
|||
// 1. it is a way for the user to deselect with the keyboard
|
||||
// 2. it is a way for the user to cancel incremental find with
|
||||
// visual feedback
|
||||
if (mIsTypeAheadOn) {
|
||||
if (mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty()) {
|
||||
// If Escape is normally used for a command, don't do it
|
||||
aEvent->PreventDefault();
|
||||
CancelFind();
|
||||
|
@ -1780,7 +1780,7 @@ nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aC
|
|||
NS_IMETHODIMP
|
||||
nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
|
||||
{
|
||||
*aIsActive = !mTypeAheadBuffer.IsEmpty();
|
||||
*aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1974,6 +1974,11 @@ nsTypeAheadFind::CancelFind()
|
|||
// 5. User tabs (this can move the selection)
|
||||
// 6. Timer expires
|
||||
|
||||
if (mLinksOnlyManuallySet == PR_FALSE && mTypeAheadBuffer.IsEmpty()) {
|
||||
// Nothing to cancel
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (mIsTypeAheadOn || mRepeatingMode != eRepeatingNone) {
|
||||
mTypeAheadBuffer.Truncate();
|
||||
DisplayStatus(PR_FALSE, nsnull, PR_TRUE); // Clear status
|
||||
|
|
Загрузка…
Ссылка в новой задаче