View Issue Details

IDProjectCategoryView StatusLast Update
0002110JEDI VCL00 JVCL Componentspublic2004-09-02 15:28
ReporteranonymousAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityrandom
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0002110: Selection bug in JvEditor
DescriptionCompile project attached in _JvHlEditorTest.zip (containing one form wit JvEditor window) and run it. Then mouse-click 'x' character inside the first line of JvEditor window. Then Press Ctrl-End (cared should move to the end of the text) and then press Crtl+{Left arrow}. Instead of one character selection a big block of text starting from mouse-clicked character up to current caret position will be selected.
Additional InformationUnfortunatelly this bug is not always reproducible, try to repeat the described sequence of mouse click + keypressings several times.
TagsNo tags attached.

Activities

2004-09-02 09:22

 

_JvHlEditorTest.zip (2,765 bytes)

anonymous

2004-09-02 10:11

viewer   ~0005142

This bug is always reproducible under the next circumstances:
1) Left-mouse-button-click somewhere inside first row of the text in (near 'x' char in _JvHlEditorTest.zip example), then, holding mouse button down (do not release it!), move mouse in any direction to select a small piece of text, then (continue holding button down!) return mouse pointer to the click position (to remove selection) then release mouse button. Then press CTRL+END to move caret to the end of the text and then press Shift+{LeftArrow}. Wrong piece of text will be selected.
It seems that something is wrong in TJvCustomEditorBase.MouseMove near SetSel(MouseMoveXX, MouseMoveYY) call but I cannot find what exacltly wrong, sorry.

maxp

2004-09-02 10:14

reporter   ~0005143

Sorry, I forgot to login before reporting this bug. So anonymous=maxp.

AHUser

2004-09-02 15:23

developer   ~0005144

The mouse related code was easy to fix. I just added a FSelection.Selecting := False in MouseUp. But for the keyboard it complicated because I do not want to add the code to every key.

AHUser

2004-09-02 15:28

developer   ~0005145

Fixed in CVS.

The MouseUp fix had introduces another bug. So I have removed it. The keyboard fix I found (set FSelection.Selecting := False in KeyDown when no Shift-Key is pressed) fixed the whole bug. The mouse issue was just a result of the keyboard issue.

Issue History

Date Modified Username Field Change
2004-09-02 09:22 anonymous New Issue
2004-09-02 09:22 anonymous File Added: _JvHlEditorTest.zip
2004-09-02 10:11 anonymous Note Added: 0005142
2004-09-02 10:14 maxp Note Added: 0005143
2004-09-02 15:23 AHUser Note Added: 0005144
2004-09-02 15:28 AHUser Status new => resolved
2004-09-02 15:28 AHUser Resolution open => fixed
2004-09-02 15:28 AHUser Assigned To => AHUser
2004-09-02 15:28 AHUser Note Added: 0005145