mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix 61336, call onchange event for changes made by scripts. sr:jst, r:pollmann
This commit is contained in:
parent
83de3b5600
commit
8244142e1c
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user