mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-11 22:41:02 +00:00
Bug 574558 - Part 2: Don't fail if we can't get the selection to adjust it after removing elements; r=roc
This commit is contained in:
parent
464f08a611
commit
5ae8a4993e
@ -204,7 +204,11 @@ NS_IMETHODIMP DeleteRangeTxn::DoTransaction(void)
|
||||
{
|
||||
nsCOMPtr<nsISelection> selection;
|
||||
result = mEditor->GetSelection(getter_AddRefs(selection));
|
||||
NS_ENSURE_SUCCESS(result, result);
|
||||
// At this point, it is possible that the frame for our root element
|
||||
// might have been destroyed, in which case, the above call returns
|
||||
// an error. We eat that error here intentionally. See bug 574558
|
||||
// for a sample case where this happens.
|
||||
NS_ENSURE_SUCCESS(result, NS_OK);
|
||||
NS_ENSURE_TRUE(selection, NS_ERROR_NULL_POINTER);
|
||||
result = selection->Collapse(mStartParent, mStartOffset);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user