bug 299622: BiDi: Pressing End in a blank line moves the caret back, to the end of the previous line. Patch by Uri Bernstein <uriber@gmail.com>. r=smontagu sr=roc

This commit is contained in:
mrbkap%gmail.com 2005-08-24 17:46:45 +00:00
parent 5187e69f5f
commit e2572c0968

View File

@ -1391,11 +1391,6 @@ nsSelection::MoveCaret(PRUint32 aKeycode, PRBool aContinueSelection, nsSelection
return result; return result;
theFrame->GetOffsets(frameStart, frameEnd); theFrame->GetOffsets(frameStart, frameEnd);
// the hint might have been reversed by an RTL frame, so make sure of it
if (nsIDOMKeyEvent::DOM_VK_HOME == aKeycode)
pos.mPreferLeft = PR_TRUE;
else if (nsIDOMKeyEvent::DOM_VK_END == aKeycode)
pos.mPreferLeft = PR_FALSE;
tHint = (HINT)pos.mPreferLeft; tHint = (HINT)pos.mPreferLeft;
if (frameStart !=0 || frameEnd !=0) // Otherwise the frame is not a text frame, so nothing more to do if (frameStart !=0 || frameEnd !=0) // Otherwise the frame is not a text frame, so nothing more to do
{ {