зеркало из https://github.com/mozilla/gecko-dev.git
caret is placed after inserted element, matches Nav 4 behavior.
This commit is contained in:
Родитель
b7e797ed52
Коммит
75e33996cd
|
@ -97,8 +97,9 @@ NS_IMETHODIMP InsertElementTxn::Do(void)
|
|||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
result = mEditor->GetSelection(getter_AddRefs(selection));
|
||||
if ((NS_SUCCEEDED(result)) && selection)
|
||||
{
|
||||
selection->Collapse(mParent, mOffset);
|
||||
{ // place the selection just after the inserted element
|
||||
selection->Collapse(mParent, mOffset+1);
|
||||
//selection->Extend(mParent, mOffset+1);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -97,8 +97,9 @@ NS_IMETHODIMP InsertElementTxn::Do(void)
|
|||
nsCOMPtr<nsIDOMSelection> selection;
|
||||
result = mEditor->GetSelection(getter_AddRefs(selection));
|
||||
if ((NS_SUCCEEDED(result)) && selection)
|
||||
{
|
||||
selection->Collapse(mParent, mOffset);
|
||||
{ // place the selection just after the inserted element
|
||||
selection->Collapse(mParent, mOffset+1);
|
||||
//selection->Extend(mParent, mOffset+1);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Загрузка…
Ссылка в новой задаче