Fix regression from bug 244761 so that only user actions will enable onChange after blur b=251833 r/sr=roc
git-svn-id: svn://10.0.0.236/trunk@159723 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1488,6 +1488,12 @@ nsListControlFrame::ExtendedSelection(PRInt32 aStartIndex,
|
||||
PRBool
|
||||
nsListControlFrame::SingleSelection(PRInt32 aClickedIndex, PRBool aDoToggle)
|
||||
{
|
||||
if (mComboboxFrame) {
|
||||
PRInt32 selectedIndex;
|
||||
GetSelectedIndex(&selectedIndex);
|
||||
mComboboxFrame->UpdateRecentIndex(selectedIndex);
|
||||
}
|
||||
|
||||
PRBool wasChanged = PR_FALSE;
|
||||
// Get Current selection
|
||||
if (aDoToggle) {
|
||||
@@ -2425,7 +2431,15 @@ nsListControlFrame::FireOnChange()
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
if (mComboboxFrame) {
|
||||
if (!mComboboxFrame->NeededToFireOnChange())
|
||||
// Return hit without changing anything
|
||||
PRInt32 index = mComboboxFrame->UpdateRecentIndex(-1);
|
||||
if (index == -1)
|
||||
return NS_OK;
|
||||
|
||||
// See if the selection actually changed
|
||||
PRInt32 selectedIndex;
|
||||
GetSelectedIndex(&selectedIndex);
|
||||
if (index == selectedIndex)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user