Project

General

Profile

Bug #11129

ChUI: Ctrl-Tab Does Not Cycle Focus Between Multiple Frames

Added by Vladimir Tsichevski 6 months ago. Updated 5 months ago.

Status:
WIP
Priority:
Normal
Assignee:
Vladimir Tsichevski
Target version:
-
Start date:
Due date:
% Done:

70%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
16353
version_resolved:
reviewer:
production:
No
env_name:
topics:

Related issues

Related to User Interface - Bug #6251: Swing ChUI: BACK-TAB does not work Rejected

History

#1 Updated by Vladimir Tsichevski 6 months ago

Run the following demo in CHARACTER mode (OE) or ChUI mode (FWD):

DEFINE VARIABLE fin AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fina AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f fin fina.
ENABLE ALL WITH FRAME f.

DEFINE VARIABLE fin2 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fina2 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f2 fin2 fina2.
ENABLE ALL WITH FRAME f2.
WAIT-FOR CLOSE OF CURRENT-WINDOW.

In this demo, two frames are created with two enabled FILL-IN widgets in each frame.
Press Ctrl-Tab one or more times.

Expected behavior in OE (CHARACTER mode)

On each Ctrl-Tab press focus moves from the currently focused FILL-IN in one frame to the first focusable FILL-IN in another frame.

Observed behavior in FWD (ChUI mode)

Pressing Ctrl-Tab works exactly as Tab — moves focus from the currently focused FILL-IN to the next focusable FILL-IN in the same frame.

Considering mouse cannot be used in FWD ChUI modes, this issue makes it impossible to set focus to any focusable widget in currently unfocused frame.

#2 Updated by Vladimir Tsichevski 6 months ago

Additional difference: In GUI mode in OE the Ctrl-Tab does nothing, while in GUI mode in FWD it also acts as Tab.

#3 Updated by Vladimir Tsichevski 6 months ago

Vladimir Tsichevski wrote:

Additional difference: In GUI mode in OE the Ctrl-Tab does nothing, while in GUI mode in FWD it also acts as Tab.

No, this is not true for GUI mode, false alarm. This happens in ChUI mode only.

#4 Updated by Vladimir Tsichevski 6 months ago

Advanced demo: Nested frames behavior in CHARACTER mode

The following 4GL example creates two independent top-level frames (outer1 and outer2), each containing two nested frames with focusable FILL-IN fields:

DEFINE FRAME outer1 WITH SIZE 45 BY 8 AT ROW 1 COL 1.

DEFINE VARIABLE fin11 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fin12 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f1 fin11 fin12 WITH SIZE 40 BY 3 AT ROW 1 COL 1.
FRAME f1:FRAME = FRAME outer1:HANDLE.
ENABLE ALL WITH FRAME f1.

DEFINE VARIABLE fin21 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fin22 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f2 fin21 fin22 WITH SIZE 40 BY 3 AT ROW 4 COL 1.
FRAME f2:FRAME = FRAME outer1:HANDLE.
ENABLE ALL WITH FRAME f2.

DEFINE FRAME outer2 WITH SIZE 45 BY 8 AT ROW 9 COL 1.

DEFINE VARIABLE fin31 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fin32 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f3 fin31 fin32 WITH SIZE 40 BY 3 AT ROW 1 COL 1.
FRAME f3:FRAME = FRAME outer2:HANDLE.
ENABLE ALL WITH FRAME f3.

DEFINE VARIABLE fin41 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE VARIABLE fin42 AS CHARACTER NO-UNDO VIEW-AS FILL-IN.
DEFINE FRAME f4 fin41 fin42 WITH SIZE 40 BY 3 AT ROW 4 COL 1.
FRAME f4:FRAME = FRAME outer2:HANDLE.
ENABLE ALL WITH FRAME f4.

ENABLE ALL WITH FRAME outer1.
ENABLE ALL WITH FRAME outer2.

WAIT-FOR CLOSE OF CURRENT-WINDOW.

Observed focus traversal behavior in OE CHARACTER mode

Tab key behavior:

  • Moves focus only within the subtree of the current top-level frame
  • In outer1: fin11fin12fin21fin22 (then cycles back)
  • In outer2: fin31fin32fin41fin42 (then cycles back)

Ctrl-Tab key behavior:

  • Moves focus between top-level frames only (ignores nested frame structure)
  • From any widget inside outer1 subtree → jumps to the first focusable widget in outer2 (fin31)
  • From any widget inside outer2 subtree → jumps to the first focusable widget in outer1 (fin11)
  • If there is only one top-level frame (or no other top-level frame has enabled focusable widgets), Ctrl-Tab does nothing

So in OE CHARACTER mode:

  • Tab traverses the full tab-order inside one top-level frame (including nested frames)
  • Ctrl-Tab is used exclusively for switching between top-level frames (window-level navigation)

#5 Updated by Vladimir Tsichevski 6 months ago

  • Related to Bug #6251: Swing ChUI: BACK-TAB does not work added

#6 Updated by Vladimir Tsichevski 6 months ago

  • Status changed from New to WIP
  • % Done changed from 0 to 40
  • Assignee set to Vladimir Tsichevski

Branch 11129a, rev. 16354: add Ctrl-Tab (working) and Shift-Ctrl-Tab (not working yet) keys handling for FILL-IN widgets

Added initial handling of Ctrl-Tab and Shift-Ctrl-Tab keys for FILL-IN widgets.

The current change is already sufficient to test multi-top-frame ChUI demo applications
containing several top-level frames with focusable widgets.

  • Ctrl-Tab works correctly (switches focus between frames as expected)
  • Shift-Ctrl-Tab does not work yet: Shift-Ctrl-Tab does not reach the normal Tab / Ctrl-Tab handler. Instead it is currently treated as ordinary Shift-Tab should be treated. At the same time plain Shift-Tab itself also works incorrectly
    (known issue, see #6251).

#7 Updated by Vladimir Tsichevski 5 months ago

Branch 11129a rebased and is now r16421.

#8 Updated by Vladimir Tsichevski 5 months ago

Vladimir Tsichevski wrote:

Additional difference: In GUI mode in OE the Ctrl-Tab does nothing, while in GUI mode in FWD it also acts as Tab.

This was either a false alarm or the difference has been fixed since then.

#9 Updated by Vladimir Tsichevski 5 months ago

Vladimir Tsichevski wrote:

Vladimir Tsichevski wrote:

Additional difference: In GUI mode in OE the Ctrl-Tab does nothing, while in GUI mode in FWD it also acts as Tab.

This was either a false alarm or the difference has been fixed since then.

Correction: Issue exists in CHARACTER mode.

In CHARACTER mode:

OE: Ctrl-Tab does nothing (no action or focus change).
FWD: Ctrl-Tab acts as regular Tab (moves focus to the next widget).

#10 Updated by Vladimir Tsichevski 5 months ago

  • % Done changed from 40 to 70

11129a rev. 16422: The issue is completely fixed for FILL-IN widgets: Shift-Ctrl-Tab now correctly cycles frames backwards.
Now similar fixes need to be applied to the keyboard handling of all other focusable widgets in ChUI mode.

Also available in: Atom PDF