Bug 359790 set text doesn't work correctly for XUL entry

patch by nian.liu at sun.com r=ginn.chen
This commit is contained in:
ginn.chen%sun.com 2006-12-18 07:02:03 +00:00
parent 2fbf4b340c
commit 7cdf9925ca

View File

@ -1357,10 +1357,16 @@ nsresult nsHyperTextAccessible::GetSelections(nsISelectionController **aSelCon,
nsCOMPtr<nsIEditor> editor = GetEditor();
if (editor) {
editor->GetSelectionController(aSelCon);
NS_ENSURE_TRUE(aSelCon, NS_ERROR_FAILURE);
editor->GetSelection(aDomSel);
NS_ENSURE_TRUE(aDomSel, NS_ERROR_FAILURE);
if (aSelCon) {
editor->GetSelectionController(aSelCon);
NS_ENSURE_TRUE(aSelCon, NS_ERROR_FAILURE);
}
if (aDomSel) {
editor->GetSelection(aDomSel);
NS_ENSURE_TRUE(aDomSel, NS_ERROR_FAILURE);
}
return NS_OK;
}