W3C home > Mailing lists > Public > www-amaya-dev@w3.org > May 2000

Re: backspace after enter

From: Irene VATTON <Irene.Vatton@inrialpes.fr>
Date: Mon, 29 May 2000 15:57:25 +0200
Message-Id: <200005291357.PAA17266@tahiti.inrialpes.fr>
To: "Mcdowell, Bryon" <Bryon.Mcdowell@ca.com>, www-amaya-dev@w3.org

> > Here is how to recreate it:
> > 1) Create a new HTML document
> > 2) Type some text
> > 3) Hit the Enter key
> > 4) Hit the Backspace key

Oops I didn't test exactly that case.
You're right, when the Backspace deleted the last paragraph of the document, 
the new selection was misplaced.
This is the bug fix:

           if (pViewSel->VsBox != NULL)
             {
               moveAfter = (pViewSel->VsBox->BxAbstractBox->AbLeafType != 
LtText
 ||
                            pViewSel->VsBox->BxAbstractBox->AbVolume == 0);
               ContentEditing (TEXT_SUP);
             }
-           if (moveAfter)
+           if (moveAfter &&
+               pViewSel->VsBox && pViewSel->VsIndBox < pViewSel->VsBox->
BxNChars)
             TtcPreviousChar (document, view);

-- 
     Irene.
Received on Monday, 29 May 2000 09:57:33 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:31:04 UTC