mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 1401225 - Pass the correct length when collapsing the selection in EditorBase::SetTextImpl(); r=masayuki
This commit is contained in:
parent
2b16b7ec4c
commit
445bf0b3fc
@ -2746,7 +2746,7 @@ EditorBase::SetTextImpl(Selection& aSelection, const nsAString& aString,
|
||||
// Only set selection to insertion point if editor gives permission
|
||||
if (GetShouldTxnSetSelection()) {
|
||||
RefPtr<Selection> selection = GetSelection();
|
||||
DebugOnly<nsresult> rv = selection->Collapse(&aCharData, length);
|
||||
DebugOnly<nsresult> rv = selection->Collapse(&aCharData, aString.Length());
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),
|
||||
"Selection could not be collapsed after insert");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user