зеркало из https://github.com/mozilla/pjs.git
Bug 256856 � Focusing field using access key displays autocomplete popup, r=mano, a=mconnor
This commit is contained in:
Родитель
c2a71f3def
Коммит
cd5dbbb71a
|
@ -812,36 +812,6 @@ nsFormFillController::Input(nsIDOMEvent* aEvent)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsFormFillController::MouseDown(nsIDOMEvent* aMouseEvent)
|
nsFormFillController::MouseDown(nsIDOMEvent* aMouseEvent)
|
||||||
{
|
{
|
||||||
mIgnoreClick = PR_FALSE;
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMEventTarget> target;
|
|
||||||
aMouseEvent->GetTarget(getter_AddRefs(target));
|
|
||||||
|
|
||||||
nsCOMPtr<nsIDOMHTMLInputElement> targetInput = do_QueryInterface(target);
|
|
||||||
if (!targetInput || (targetInput && targetInput != mFocusedInput)) {
|
|
||||||
// A new input will be taking focus. Ignore the first click
|
|
||||||
// so that the popup is not shown.
|
|
||||||
mIgnoreClick = PR_TRUE;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsFormFillController::MouseUp(nsIDOMEvent* aMouseEvent)
|
|
||||||
{
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
|
||||||
nsFormFillController::MouseClick(nsIDOMEvent* aMouseEvent)
|
|
||||||
{
|
|
||||||
if (mIgnoreClick) {
|
|
||||||
mIgnoreClick = PR_FALSE;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mFocusedInput)
|
if (!mFocusedInput)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
|
@ -880,6 +850,18 @@ nsFormFillController::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsFormFillController::MouseUp(nsIDOMEvent* aMouseEvent)
|
||||||
|
{
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsFormFillController::MouseClick(nsIDOMEvent* aMouseEvent)
|
||||||
|
{
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsFormFillController::MouseDblClick(nsIDOMEvent* aMouseEvent)
|
nsFormFillController::MouseDblClick(nsIDOMEvent* aMouseEvent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,6 @@ protected:
|
||||||
PRPackedBool mCompleteSelectedIndex;
|
PRPackedBool mCompleteSelectedIndex;
|
||||||
PRPackedBool mForceComplete;
|
PRPackedBool mForceComplete;
|
||||||
PRPackedBool mSuppressOnInput;
|
PRPackedBool mSuppressOnInput;
|
||||||
PRPackedBool mIgnoreClick;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __nsFormFillController__
|
#endif // __nsFormFillController__
|
||||||
|
|
Загрузка…
Ссылка в новой задаче