Open Bug 1888848 Opened 2 years ago Updated 2 years ago

[sway][wayland] Cannot type level 3 characters

Categories

(Core :: Widget: Gtk, defect)

Firefox 124
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kupospelov, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

  1. Configure sway to enable level 3 characters, for example:

input type:keyboard {
xkb_layout pl
xkb_options altwin:swap_alt_win,grp:win_space_toggle,lv3:ralt_switch
}

  1. Open firefox and try to type AltGr + l into the address bar.

Actual results:

Nothing happens.

Expected results:

Character "ł" should appear in the address bar.

Note that other GTK or Qt applications (e.g. Gnome Files, Telegram Desktop, the foot terminal) do not have this issue.

Also, there is no such problem when running Firefox using XWayland.

The official Firefox build from https://www.mozilla.org/en-US/firefox/download/thanks is also affected.

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Address Bar
Component: Address Bar → DOM: Editor
Product: Firefox → Core

Does it work with Gnome Shell?

Sending to Widget due to comment #1 stating a difference between Wayland and XWayland.

Component: DOM: Editor → Widget: Gtk
Flags: needinfo?(kupospelov)

It does work with Gnome Shell. AFAIU Gnome uses IBus, I guess that might be the difference.

However, somehow text input in Gnome Files (and any other application that I tested) works fine regardless of whether I run it in Gnome or Sway.

Flags: needinfo?(kupospelov)
Flags: needinfo?(kupospelov)

Just downloaded and ran firefox-126.0a1.en-US.linux-x86_64, it has the same issue.

Flags: needinfo?(kupospelov)

Is that a recent regression? Did it worked before?
Thanks.

Flags: needinfo?(kupospelov)

I noticed this when configuring a new laptop, so I never saw it working on the same machine.

However, when I then checked my old laptop, I saw the same issue. Both ran Archlinux and Firefox 124. Frankly I did not use that laptop too often, so I'm not sure when exactly it broke. FWIW I few years ago I had to set GTK_IM_MODULE=xim to make 3rd level characters work (even though I already used Firefox in the Wayland-native mode AFAIR).

The interesting twist is that I have another laptop that runs Debian. For some reason 3rd level characters still can be typed there (regardless of whether GTK_IM_MODULE is set or not).

So I guess it's somehow related to the environment in which Firefox runs, but it's hard to say why it works in Debian, but not in Arch.

Flags: needinfo?(kupospelov)

I found another important detail: this only affects configurations with both lv3:ralt_switch (right Alt) and altwin:swap_alt_win xkb options enabled. If I remove altwin:swap_alt_win or use lv3:switch (right Ctrl), level 3 input works again.

This behavior still looks like a bug to me (given that all other apps can handle the configuration above), but I'm not sure how to debug this further. It's also not clear why this behavior depends on the distro.

For now I managed to work around this issue by replacing altwin:swap_alt_win with altwin:swap_lalt_lwin.

I hope that helps.

Hello! Thank you for submitting this issue I have tried to reproduce the issue on my end but unfortunately I wasn't able to with firefox 129.0a1(2024-06-10) on Ubuntu 22.04.
Could you please answer the following questions in order to further investigate this issue?

  1. Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
  2. Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
  3. Do you have any addons installed? If yes could you please list them?
Flags: needinfo?(kupospelov)
You need to log in before you can comment on or make changes to this bug.