beeware/toga

Readonly Textinput beeps on focus loss with keyboard on GTK

Open

#2554 aperta il 6 mag 2024

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Python (624 fork)batch import
buggood first issuegtklinux

Metriche repository

Star
 (3615 star)
Metriche merge PR
 (Merge medio 5g) (64 PR mergiate in 30 g)

Descrizione

Describe the bug

Under GTK, If a readonly text input loses focus as a result of keyboard input (i.e., pressing tab), a beep is emitted.

Steps to reproduce

  1. Run Tutorial 1
  2. Type Tab twice

A beep will be emitted when the Celsius field loses focus.

Expected behavior

No beep should be emitted.

Screenshots

No response

Environment

  • Operating System: Ubuntu 22.04
  • Python version: All
  • Software versions:
    • Toga: 0.4.2+

Logs

Additional context

No beep is emitted on loss of focus.

It's arguable whether the readonly widget should be able to accept focus at all - that's the behavior on macOS. If this is acceptable, calling native.set_can_focus() as part of set_readonly() might be a fix for this.

There is likely similar issues on any other widget with a clear input focus and a readonly option.

Guida contributor