mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-27 15:55:16 +00:00
Bug 339661 Location bar dropdown does not disappear on second click r=mconnor
This commit is contained in:
parent
86d9f381b7
commit
9ebd103ee6
@ -40,7 +40,7 @@
|
||||
|
||||
interface nsIAutoCompletePopup;
|
||||
|
||||
[scriptable, uuid(e312267f-8f57-43e8-a904-ff9b5d3f5aef)]
|
||||
[scriptable, uuid(AC029254-06DD-4dff-878C-A292117DE2D3)]
|
||||
interface nsIAutoCompleteInput : nsISupports
|
||||
{
|
||||
/*
|
||||
@ -156,4 +156,10 @@ interface nsIAutoCompleteInput : nsISupports
|
||||
* @return True if the user wishes to prevent the revert
|
||||
*/
|
||||
boolean onTextReverted();
|
||||
|
||||
/*
|
||||
* This popup should consume or dispatch the rollup event.
|
||||
* TRUE: should consume; FALSE: should dispatch.
|
||||
*/
|
||||
readonly attribute boolean consumeRollupEvent;
|
||||
};
|
||||
|
@ -592,8 +592,11 @@ nsAutoCompleteController::AttachRollupListener()
|
||||
{
|
||||
nsIWidget* widget = GetPopupWidget();
|
||||
NS_ENSURE_TRUE(widget, NS_ERROR_FAILURE);
|
||||
NS_ASSERTION(mInput, "mInput must not be null.");
|
||||
PRBool consumeRollupEvent = PR_FALSE;
|
||||
mInput->GetConsumeRollupEvent(&consumeRollupEvent);
|
||||
return widget->CaptureRollupEvents((nsIRollupListener*)this,
|
||||
PR_TRUE, PR_FALSE);
|
||||
PR_TRUE, consumeRollupEvent);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
@ -456,6 +456,13 @@ nsFormFillController::OnTextReverted(PRBool *_retval)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFormFillController::GetConsumeRollupEvent(PRBool *aConsumeRollupEvent)
|
||||
{
|
||||
*aConsumeRollupEvent = PR_FALSE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//// nsIAutoCompleteSearch
|
||||
|
||||
|
@ -164,7 +164,10 @@
|
||||
|
||||
<property name="searchCount" readonly="true"
|
||||
onget="this.initSearchNames(); return this.mSearchNames.length;"/>
|
||||
|
||||
|
||||
<property name="consumeRollupEvent" readonly="true"
|
||||
onget="return true;"/>
|
||||
|
||||
<method name="getSearchAt">
|
||||
<parameter name="aIndex"/>
|
||||
<body><![CDATA[
|
||||
@ -334,10 +337,6 @@
|
||||
|
||||
<method name="showHistoryPopup">
|
||||
<body><![CDATA[
|
||||
// This is an autocomplete widget, but we want the rollup event
|
||||
// to be consumed, as if we were a menulist.
|
||||
this.popup.popupBoxObject.setConsumeRollupEvent(Components.interfaces.nsIPopupBoxObject.ROLLUP_CONSUME);
|
||||
|
||||
this.maxRows = 14;
|
||||
// Eusure this having focus.
|
||||
if (!this.focused)
|
||||
|
Loading…
x
Reference in New Issue
Block a user