Posted 16 years ago
by Mike Strobel
-
Software Engineer,
CDC Software

I noticed that when I click to focus an empty editor, the caret is not positioned at the beginning of the first input part. For instance, in the "MaskedTextBox Mask" QuickStart (with a Currency mask selected), clicking anywhere to the right of the input parts results in the caret being shown at the end of the input area. Yet, entering a character causes the caret to jump to the beginning. I believe the caret placement should work like this:
if cursor is over an editor part with some value
then focus that part
else if cursor is between two parts, both with values
then focus the nearest part
else if parts adjacent to cursor have no values but any preceding part has a value
then focus the part following the nearest preceding part that has a value
else focus the first part
At the very least, I think it makes sense to move the caret to the first part if the entire editor is empty. The fact that the first character typed may cause the caret to jump positions from the end to the beginning seems confusing.
Regards,
Mike
[Modified at 03/11/2009 03:50 PM]
if cursor is over an editor part with some value
then focus that part
else if cursor is between two parts, both with values
then focus the nearest part
else if parts adjacent to cursor have no values but any preceding part has a value
then focus the part following the nearest preceding part that has a value
else focus the first part
At the very least, I think it makes sense to move the caret to the first part if the entire editor is empty. The fact that the first character typed may cause the caret to jump positions from the end to the beginning seems confusing.
Regards,
Mike
[Modified at 03/11/2009 03:50 PM]