Fix 61336, call onchange event for changes made by scripts. sr:jst, r:pollmann
git-svn-id: svn://10.0.0.236/trunk@94841 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2753,7 +2753,7 @@ nsListControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName,
|
||||
if (mSelectedIndex != selectedIndex) {
|
||||
ToggleSelected(selectedIndex); // sets mSelectedIndex
|
||||
if (nsnull != mComboboxFrame && mIsAllFramesHere) {
|
||||
mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event
|
||||
mComboboxFrame->UpdateSelection(PR_TRUE, PR_TRUE, selectedIndex); // do dispatch event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3311,6 +3311,9 @@ nsGfxTextControlFrame2::SetTextControlFrameState(const nsAReadableString& aValue
|
||||
mEditor->SetFlags(savedFlags);
|
||||
if (selPriv)
|
||||
selPriv->EndBatchChanges();
|
||||
|
||||
// send onchange here to ctach DOM based changes
|
||||
CallOnChange();
|
||||
}
|
||||
|
||||
if (mScrollableView)
|
||||
|
||||
@@ -2753,7 +2753,7 @@ nsListControlFrame::SetProperty(nsIPresContext* aPresContext, nsIAtom* aName,
|
||||
if (mSelectedIndex != selectedIndex) {
|
||||
ToggleSelected(selectedIndex); // sets mSelectedIndex
|
||||
if (nsnull != mComboboxFrame && mIsAllFramesHere) {
|
||||
mComboboxFrame->UpdateSelection(PR_FALSE, PR_TRUE, selectedIndex); // don't dispatch event
|
||||
mComboboxFrame->UpdateSelection(PR_TRUE, PR_TRUE, selectedIndex); // do dispatch event
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user