Bug #10856
Logical FILL-IN: Caret position issues
100%
Related issues
History
#1 Updated by Vladimir Tsichevski 8 months ago
Run this simplest possible example in GUI mode:
DEFINE VARIABLE l AS LOGICAL NO-UNDO. DEFINE FRAME f l NO-LABEL. ENABLE ALL WITH FRAME f. MESSAGE LENGTH(l:SCREEN-VALUE). WAIT-FOR WINDOW-CLOSE OF FRAME f.
In this example, a frame with a single FILL-IN of LOGICAL type with the default (yes/no) format is displayed and enabled. Before starting the WAIT-FOR loop, the length of the screen value is reported.
Issue 1: Incorrect initial caret position¶
Initially:
In OE: The screen value is empty (the length reported is 0), and the caret position is 0.
In FWD: The screen value is also empty (the length reported is 0), but the caret position is 1.
Issue 2: Cannot move caret to the rightmost position with Right key¶
- Type
y. - The screen value is now
yes, and the caret position is 1, as expected. - Press the
Rightkey two times to move the caret right.
In OE: The caret moves right from the s, as expected.
In FWD: The caret stops between the e and s.
Note: It is still possible to move the caret to the rightmost position with a mouse click in the FILL-IN area right of yes or with the End key.
Issue 3: Cannot move caret with UP and DOWN keys¶
In OE: The Up key acts the same as the Left key. The Down key acts the same as the Right key.
In FWD: The Up and Down keys do nothing.
#2 Updated by Vladimir Tsichevski 8 months ago
- Related to Bug #10857: Logical FILL-IN initial state: Incorrect handling of unmatched keys added
#3 Updated by Delia Mitric 7 months ago
Vladimir Tsichevski wrote:
Issue 3: Cannot move caret with UP and DOWN keys¶
In OE: The
Upkey acts the same as theLeftkey. TheDownkey acts the same as theRightkey.In FWD: The
UpandDownkeys do nothing.
In FWD, UP and DOWN do nothing for any type of FILL -IN (date based, logical, character and so on).
#6 Updated by Delia Mitric 7 months ago
- % Done changed from 0 to 90
I've committed the solution for issue 2 and issue 3 to 10856a branch rev. 16322.
issue 1 is solved under #10857.
issue2: the problem is in BollFormat.moveCursorRight, the condition is if (presCursorPos < getScreenWidth() - 1) and it should be if (presCursorPos < getScreenWidth()) to let the cursor to reach the last possible position.
issue3: added support for UP, DOWN, SHIFT-UP, SHIFT-DOWN keys.
#7 Updated by Delia Mitric 7 months ago
- the caret position is initially wrong also for
DECIMAL/INTEGERfill-ins - the cursor cannot reach the last character from a fill-in with DATETIME/NUMBER format: the same problem like issue 2
Should I treat these issues under this one, or open a new Redmine issue for them?
#8 Updated by Vladimir Tsichevski 7 months ago
Delia Mitric wrote:
Other things I've noticed:
- the caret position is initially wrong also for
DECIMAL/INTEGERfill-ins- the cursor cannot reach the last character from a fill-in with DATETIME/NUMBER format: the same problem like issue 2
Should I treat these issues under this one, or open a new Redmine issue for them?
These other issues might be registered already. Otherwise, IMO new Redmine task(s) should be created for them.
#10 Updated by Vladimir Tsichevski 7 months ago
Delia Mitric wrote:
Okay, so in this case this can be moved to Review status
Code review and testing 10856a rev. 16322.
Testing
Now UP and Down keys move caret, but do not drop selection, as expected.
Code review
BoolFormat.java: history entry line length exceeds 110 character limit.
#12 Updated by Delia Mitric 6 months ago
- Status changed from WIP to Review
- % Done changed from 80 to 100
Vladimir Tsichevski wrote:
Code review and testing 10856a rev. 16322.
Testing
Now
UPandDownkeys move caret, but do not drop selection, as expected.
Fixed this in rev. 16323.
Vladimir, please review it. Thank you!
#13 Updated by Vladimir Tsichevski 6 months ago
Vladimir Tsichevski wrote:
Code review
BoolFormat.java: history entry line length exceeds 110 character limit.
This is not fixed yet.
Also, Ctrl-Up and Ctrl-Down are expected to act similar to Ctrl-Left and Ctrl-Right (as Home and End), but they do not.
All other issues are fixed.
#14 Updated by Delia Mitric 6 months ago
Vladimir Tsichevski wrote:
Vladimir Tsichevski wrote:
Code review
BoolFormat.java: history entry line length exceeds 110 character limit.This is not fixed yet.
Also,
Ctrl-UpandCtrl-Downare expected to act similar toCtrl-LeftandCtrl-Right(asHomeandEnd), but they do not.All other issues are fixed.
- fixed the history entries length
- added support for
CTRL-UP, CTRL-DOWN, CTRL-SHIFT-UP, CTRL-SHIFT-DOWN
Committed the new changes to 10856a branch.
Vladimir, please review rev. 16324. Thank you!
#17 Updated by Vladimir Tsichevski 6 months ago
Delia Mitric wrote:
Rebased 10856a to the latest trunk
Testing rev. 16367.
Regression found: Up and Down keys in ChUI now work the same as in GUI. In OE CHARACTER mode they must do nothing but move focus by one widget down.
After your change also, in ChUI mode the Up and Down keys are handled in two places in FillIn.processKeyEvent(): in the original key handler, where moveBelowWidget / moveAboveWidget are called in ChUI, next in the Left / Up handler, which I think should not be visited for Up and Down keys in ChUI.
#19 Updated by Delia Mitric 6 months ago
- Status changed from WIP to Review
- % Done changed from 90 to 100
Vladimir Tsichevski wrote:
Delia Mitric wrote:
Rebased 10856a to the latest trunk
Testing rev. 16367.
Regression found:
UpandDownkeys in ChUI now work the same as in GUI. In OE CHARACTER mode they must do nothing but move focus by one widget down.After your change also, in ChUI mode the
UpandDownkeys are handled in two places inFillIn.processKeyEvent(): in the original key handler, wheremoveBelowWidget/moveAboveWidgetare called in ChUI, next in theLeft/Uphandler, which I think should not be visited forUpandDownkeys in ChUI.
This should be fixed in rev. 16368.
Vladimir, please review
#20 Updated by Vladimir Tsichevski 6 months ago
Delia Mitric wrote:
Vladimir Tsichevski wrote:
Delia Mitric wrote:
Rebased 10856a to the latest trunk
Testing rev. 16367.
Regression found:
UpandDownkeys in ChUI now work the same as in GUI. In OE CHARACTER mode they must do nothing but move focus by one widget down.After your change also, in ChUI mode the
UpandDownkeys are handled in two places inFillIn.processKeyEvent(): in the original key handler, wheremoveBelowWidget/moveAboveWidgetare called in ChUI, next in theLeft/Uphandler, which I think should not be visited forUpandDownkeys in ChUI.This should be fixed in rev. 16368.
Vladimir, please review
Still at rev. 16367.
#22 Updated by Vladimir Tsichevski 6 months ago
10856a rev. 16368 (testing results + code review)
Code review: the change is good.
Test case – new demo with grid-like layout of 7 FILL-IN widgets of mixed types¶
DEFINE VARIABLE l AS LOGICAL NO-UNDO.
DEFINE VARIABLE lr AS LOGICAL NO-UNDO.
DEFINE VARIABLE l2 AS LOGICAL NO-UNDO.
DEFINE VARIABLE l2r AS LOGICAL NO-UNDO.
DEFINE VARIABLE c AS CHARACTER NO-UNDO.
DEFINE VARIABLE l3 AS LOGICAL NO-UNDO.
DEFINE VARIABLE l3r AS LOGICAL NO-UNDO.
DEFINE VARIABLE counter AS INTEGER NO-UNDO.
DEFINE FRAME f
l lr SKIP
l2 l2r SKIP
c SKIP
l3 l3r
NO-LABEL.
ENABLE ALL WITH FRAME f.
WAIT-FOR WINDOW-CLOSE OF FRAME f.
Fixed issues¶
- Incorrect initial caret position (FWD placed it at 1 instead of 0)
- Cannot move caret to the rightmost position using Right key
- (for all FILL-IN types): Up / Down keys do nothing in FWD
In OE: Up acts like Left, Down acts like Right - Up and Down keys move caret but do not drop selection (now correct)
BoolFormat.javahistory entry line length exceeds 110-character limit- (GUI): Ctrl-Up / Ctrl-Down now behave similarly to Ctrl-Left / Ctrl-Right
- (ChUI): Up / Down keys must not move caret inside the widget; they should only move focus to the widget above/below
Unresolved / unreported¶
- The caret position is initially wrong also for
DECIMAL/INTEGERFILL-INwidgets
Newly discovered issues (ChUI only)¶
Run the test case in CHARACTER mode.
1. Wrong caret position after focus round-trip (Down → Up)¶
Steps:
- Press Down (focus →
l2), then Up (focus returns tol) - Press Right three times (focus →
lr, caret at position 0 – correct) - Press Left (focus returns to
l)
Result:
- OE: caret at position 0 (leftmost) – correct
- FWD: caret at position 2 (rightmost) – incorrect
Note: The preliminary Down → Up sequence is required to reproduce the issue. Without it, focus returns to position 0 as expected.
2. Incorrect behaviour of Home and End keys¶
- OE: Home → first widget in tab order, caret = 0
End → last widget in tab order, caret = 0 - FWD: Home → caret = 0 in current widget
End → no action
Expected: same as OE (global navigation to first/last widget)
3. Incorrect vertical focus movement (Up / Down) – non-strict alignment¶
Steps:
- Move focus to
cFILL-IN(bottom row) - Move caret so it is visually below
l2r(positions ~5–7) - Press Up
Result:
- OE: focus moves strictly upward to
l2r - FWD: focus moves to
l2(left column), caret = 0 – incorrect
Similar misalignment occurs with Down key.
4. Shift- and/or Ctrl- modifiers must disable navigation keys in ChUI¶
In CHARACTER mode, any combination of Shift + navigation key or Ctrl + navigation key must do nothing (no caret movement, no focus change).
Current FWD behaviour: modifiers are ignored → navigation still occurs.
#25 Updated by Hynek Cihlar 6 months ago
Vladimir Tsichevski wrote:
Delia Mitric wrote:
Vladimir, should we move on to the testing phase, or would you like me to address other issues (listed in #10856-22) related to this one?
Yes, as long as the other issues from #10856-22 are split into their own separate tasks.
Delia, please move the other issues in separate task(s) and start testing.
#29 Updated by Hynek Cihlar 6 months ago
Delia Mitric wrote:
- Tested a customer GUI application (+ ChUI) and Hotel GUI. No regression found.
- Xfer related fill-in tests passed
Any more testing left?
#30 Updated by Delia Mitric 6 months ago
Hynek Cihlar wrote:
Delia Mitric wrote:
- Tested a customer GUI application (+ ChUI) and Hotel GUI. No regression found.
- Xfer related fill-in tests passed
Any more testing left?
I talked with Razvan about ChUI tests and with Serban for smoke testing on another Customer GUI app.
#31 Updated by Hynek Cihlar 6 months ago
Vladimir, there are many great findings in the issue. I suppose you had to create multiple tests to cover the changes. Are all of them checked in?
#33 Updated by Razvan-Nicolae Chichirau 4 months ago
Delia, I reran the ChUI regression tests with the changes from 10856a. Previously there were 28 failing tests, but now they all pass. I guess it was something on my side producing the wrong results. Anyway, everything looks good now. 🎉
#36 Updated by Radu Apetrii 4 months ago
- Status changed from Internal Test to Merge Pending
Delia Mitric wrote:
It is ready to be merged
Looks good to me as well. 10856a can be merged right now.