Unexpected Keyboard Focus Between Adjacent Vertical Boxes

output

Hi! I have a question about keyboard navigation between boxes.

This is a minimal example of my issue. I have two vertical boxes with buttons, placed side by side in a horizontal box. When I use the arrow keys to navigate, for example, moving right from Button 1A skips to Button 3B instead of Button 1B.

Is this expected? Is there a workaround?

Here’s a minimal Blueprint version of the issue:

using Gtk 4.0;
using Adw 1;

Box {
  orientation: horizontal;
  spacing: 20;

  Box {
    orientation: vertical;
    spacing: 10;

    Gtk.Button {
      label: "Button 1A";
    }

    Gtk.Button {
      label: "Button 2A";
    }

    Gtk.Button {
      label: "Button 3A";
    }
  }

  Box {
    orientation: vertical;
    spacing: 10;

    Gtk.Button {
      label: "Button 1B";
    }

    Gtk.Button {
      label: "Button 2B";
    }

    Gtk.Button {
      label: "Button 3B";
    }
  }
}

Hi,

That’s looks like a bug, yes.
In gtk3, the left/right arrows used to focus the widget on the same “visual row”, but it looks like it’s not the case anymore in gtk4.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.