Bug #15169

Greeter: Text direction is not updated in password entries

Added by Anonymous 2018-01-16 10:53:50 . Updated 2020-04-15 06:02:16 .

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2018-01-16
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Welcome Screen
Deliverable for:

Description

I just played around a little bit with some keyboard bugs in the greeter when this problem appeared:

- I select an Afghani keyboard (written RTL)

- I try to set an admin password but then I realize that I can’t type in Afghani

- I go back to the keyboard and language options and select German everywhere
- I reopen the additional options screen and want to type an admin password but my keyboard layout is still RTL and I can’t see if I’m typing in German or in Afghani now

I went back again to the main window and rechose the German layout, and then after two times the additional options screen adjusted and let me type LTR.


Subtasks


Related issues

Related to Tails - Bug #12598: Afghani keyboard selected in Greeter if typing fast Confirmed 2017-05-25
Related to Tails - Feature #14544: Spend software developer time on smallish UX improvements In Progress 2018-08-31
Blocks Tails - Feature #16209: Core work: Foundations Team Confirmed

History

#1 Updated by Anonymous 2018-01-16 10:54:14

  • related to Bug #12598: Afghani keyboard selected in Greeter if typing fast added

#2 Updated by sajolida 2019-01-22 18:14:34

I confirm some weird behaviors in the keyboard layout changes in Tails Greeter.

Sometimes I can get the password field to (apparently) change to the new keyboard layout by pressing “Tab” to switch between the first and the second password field.

#3 Updated by sajolida 2019-01-22 18:14:49

  • related to Feature #14544: Spend software developer time on smallish UX improvements added

#4 Updated by intrigeri 2019-01-23 10:05:07

  • Subject changed from Keyboard layout in Addition options screen in the greeter not updated to Keyboard layout in Additional options screen in the greeter not updated

#5 Updated by sajolida 2019-01-23 17:29:20

  • Subject changed from Keyboard layout in Additional options screen in the greeter not updated to Keyboard layout is not updated in Administration Password fields in Greeter

#6 Updated by sajolida 2019-08-22 17:04:24

Alan hasn’t touched this ticket since it was created over 1 year ago and I think that we should unblock it.

#7 Updated by intrigeri 2019-08-24 11:10:28

#8 Updated by intrigeri 2019-08-24 11:11:29

  • Assignee deleted (alant)

sajolida wrote:
> Alan hasn’t touched this ticket since it was created over 1 year ago and I think that we should unblock it.

Yes, let’s make it clear that this one is up for grabs, and could be tackled by any FT member: there’s no particular reason why we need to block on Alan here.

#9 Updated by segfault 2019-09-25 10:55:53

I spent too much time on this but couldn’t solve it. Here is what I found out:

  • If the keyboard layout is changed, the text direction of the password entry while focussed is only updated if you press Shift or Caps Lock inside the entry. I could not reproduce the Tab-related update reported by sajolida - I guess that he pressed Shift+Tab which triggered the update.
  • The keyboard layout itself is not affected: You always type in the currently selected layout, it’s just the text direction of the entry that is incorrect.
  • The text direction update is not triggered by the Greeter (there is no Python code executed when I press Shift). It could be some weird GTK thing. Not sure whether it’s worth to report upstream.
  • Things like gtk_widget_reset_style don’t help.
  • The text direction of the entry while not focussed is not affected by the keyboard layout at all, but by the current language. This can be changed by the gtk_widget_set_direction function.
  • If an RTL language is chosen in the greeter, then the text direction of the entry is RTL (whether focussed or not).
  • Text entries created after the keyboard layout was changed have the correct text direction while focussed.

We could fix this by recreating the password entry every time the administration setting is opened. But the way the Greeter is implemented makes this change very hard: The password entry is created from the UI file and added as an attribute to multiple objects. I don’t think solving this issue is worth the effort. But maybe I we will refactor the Greeter at some point (I would like to do that), and then we could fix this.

#10 Updated by segfault 2019-09-28 23:06:21

  • Subject changed from Keyboard layout is not updated in Administration Password fields in Greeter to Greeter: Text direction is not updated in password entries

#11 Updated by intrigeri 2020-02-23 10:42:16

Alan believes that if GTK explicitly supports changing text direction globally in an already running app, then this is likely a bug in GTK. We should first check this. Interesting resources:

Else, we could manually set text direction on all entry widgets whenever the user selects a different language; in which case, having the entire UI already created (but not displayed) from the UI file on startup might be an advantage.

#12 Updated by intrigeri 2020-04-15 06:02:16

  • Affected tool changed from Greeter to Welcome Screen