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

backspace after enter

From: Mcdowell, Bryon <Bryon.Mcdowell@ca.com>
Date: Mon, 22 May 2000 18:24:54 -0400 (EDT)
Message-ID: <27B34B6046FFD311BD880050046DFAD4F54E6C@usilms01.cai.com>
To: www-amaya-dev@w3.org
There is an error in the code that handles the Backspace key.  

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

Notice the placement of the cursor; it is one space to the left of where it
should be.  I looked at the code for TtcDeletePreviousChar(...) which
handles this case.  There is a flag called moveAfter that causes the
undesired cursor movement.  The problem is that I don't completely
understand the conditions that sets this flag.  Can anyone shed some light
on this for me?

Code from TtcDeletePreviousChar(...):

 /* delete the current selection instead of the previous char */
CloseTextInsertion ();
/* by default doen't change the selection after the delete */
moveAfter = FALSE
if (pViewSel->VsBox != NULL)
	moveAfter = (pViewSel->VsBox->BxAbstractBox->AbLeafType != LtText ||
		pViewSel->VsBox->BxAbstractBox->AbVolume == 0);
	ContentEditing (TEXT_SUP);
if (moveAfter)
	TtcPreviousChar (document, view);

Thanks again,

Bryon McDowell
Received on Tuesday, 23 May 2000 04:30:08 UTC

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