Setting selectedIndex should clear all "previous value" state so that onchange

won't fire unless the user actually changes the value from the one set by
setting selectedIndex.  r=mats, sr=roc, a=roc


git-svn-id: svn://10.0.0.236/trunk@169304 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-02-17 04:29:37 +00:00
parent 5ce600c63a
commit 952aaf5063

View File

@@ -2205,7 +2205,9 @@ NS_IMETHODIMP
nsListControlFrame::OnSetSelectedIndex(PRInt32 aOldIndex, PRInt32 aNewIndex)
{
if (mComboboxFrame) {
mComboboxFrame->UpdateRecentIndex(aOldIndex);
// UpdateRecentIndex with -1, so that we won't fire an onchange
// event for this setting of selectedIndex.
mComboboxFrame->UpdateRecentIndex(-1);
}
ScrollToIndex(aNewIndex);