fix for up down behavior after typing or selecting sr=kin a=scc r=jfrancis

git-svn-id: svn://10.0.0.236/trunk@119176 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mjudge%netscape.com
2002-04-16 23:26:22 +00:00
parent a8c06c892e
commit e9cb2b63a8
2 changed files with 6 additions and 0 deletions

View File

@@ -2765,7 +2765,9 @@ nsSelection::TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset,
}
else
{
PRBool oldDesiredXSet = mDesiredXSet; //need to keep old desired X if it was set.
mDomSelections[index]->Collapse(domNode, aContentOffset);
mDesiredXSet = oldDesiredXSet; //now reset desired X back.
mBatching = batching;
mChangesDuringBatching = changes;
}
@@ -5892,6 +5894,7 @@ nsTypedSelection::Collapse(nsIDOMNode* aParentNode, PRInt32 aOffset)
{
if (!aParentNode)
return NS_ERROR_INVALID_ARG;
mFrameSelection->InvalidateDesiredX();
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
return NS_ERROR_FAILURE;
nsresult result;

View File

@@ -2765,7 +2765,9 @@ nsSelection::TakeFocus(nsIContent *aNewFocus, PRUint32 aContentOffset,
}
else
{
PRBool oldDesiredXSet = mDesiredXSet; //need to keep old desired X if it was set.
mDomSelections[index]->Collapse(domNode, aContentOffset);
mDesiredXSet = oldDesiredXSet; //now reset desired X back.
mBatching = batching;
mChangesDuringBatching = changes;
}
@@ -5892,6 +5894,7 @@ nsTypedSelection::Collapse(nsIDOMNode* aParentNode, PRInt32 aOffset)
{
if (!aParentNode)
return NS_ERROR_INVALID_ARG;
mFrameSelection->InvalidateDesiredX();
if (!IsValidSelectionPoint(mFrameSelection, aParentNode))
return NS_ERROR_FAILURE;
nsresult result;