From 41ff9bdb2d0a43c57203c5a7fdd4b0f0508ccbdd Mon Sep 17 00:00:00 2001 From: "uriber%gmail.com" Date: Thu, 11 May 2006 16:28:01 +0000 Subject: [PATCH] Bug 336590: Caret can not be placed after space at the end of a wrapped line in textarea, using the mouse. r+sr=roc git-svn-id: svn://10.0.0.236/trunk@196314 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsSelection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index 19bf635bd92..6fe2394fbbf 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -4042,8 +4042,6 @@ void nsTypedSelection::setAnchorFocusRange(PRInt32 indx) } else{ mAnchorFocusRange = mRangeArray[indx]; - // Make sure the caret appears on the next line, if at a newline - SetInterlinePosition(PR_TRUE); } } @@ -5138,6 +5136,9 @@ nsTypedSelection::AddRange(nsIDOMRange* aRange) } setAnchorFocusRange(count -1); + // Make sure the caret appears on the next line, if at a newline + SetInterlinePosition(PR_TRUE); + nsCOMPtr presContext; GetPresContext(getter_AddRefs(presContext)); selectFrames(presContext, aRange, PR_TRUE);