Skip to content

Cannot create the first attribute in a class using keyboard only #2155

@jaragunde

Description

@jaragunde

Describe the bug

On class diagrams, when you have a class selected, you can press tab to navigate through the fields of the side bar. Normally, you would be able to tab into the "attributes" and "operations" sections, press enter and type a name to create one, but this doesn't work if there are no attributes or operations in the list already.

To Reproduce

Steps to reproduce the behavior:

  1. Create a class diagram
  2. Create a new class
  3. Enter a name
  4. Press tab multiple times until you focus the attributes list in the right area
  5. Press enter, focus marker just disappears

Message from (top-right menu) → ToolsError Reports:

Gaphor version:    2.17.0
Operating System:  Linux (6.1.18-200.fc37.x86_64)
Python version:    3.10.6
GTK version:       4.8.3
Adwaita version:   1.2.2
PyGObject version: 3.42.2
Pycairo version:   1.23.0
Cairo version:     1.16.0
Pango version:     1.50.12
Display:           GdkWaylandDisplay


No errors have been intercepted. We’re good.

Expected behavior

After you press enter, a text box should appear for you to type an attribute name, but it doesn't. You need to use the mouse to click on that widget for this to happen.

Notice that the bug doesn't happen if there are already some attributes. In that case, you may use arrow keys to navigate through the existing attributes, reach the last row and press enter to create a new one.

This is also reproducible for class operations.

Screenshots

If applicable, add screenshots to help explain your problem.

OS

  • Linux (Please put in notes the specific distro)
  • macOS
  • Windows

Version

Version of Gaphor: 2.17.0

Additional information

Using Fedora Linux 37 (Workstation Edition), GNOME 43.3, Wayland

Metadata

Metadata

Assignees

Labels

bugAn issue in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions