зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1401225 - Pass the correct length when collapsing the selection in EditorBase::SetTextImpl(); r=masayuki
This commit is contained in:
Родитель
2b16b7ec4c
Коммит
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");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче