-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double input with fcitx5 on chrome dev under some cases #620
Comments
Uhh, honestly no clue about the text-input and IME stuff. Though, people have been using it fine with other clients. @kchibisov do you perhaps have any idea what could be happening here? |
it's a virtual keyboard that acting weirdly, I'd say, but it just forwards whatever you have in pressed. Maybe the fact that chrome does a lot of enable/disable somehow confuses fcitx, since niri itself will send the key event either to fcitx or to the application directly, it can not send it to both sources? What I'd suggest is to debug fcitx and not chrome here, and try to figure out the source of the double input. I use text-input-v3 with fcitx5 daily with all the apps I have and I've never seen such a thing, so it could be an edge case in fcitx5 or maybe some edge case in niri (which I doubt). |
I found something maybe related, the Filter input box cannot actually get input from ime (where it does not allow me to switch to any other input rather than english), and one another place where I can trigger this issue consistently is the danmuku input box on bilibili when it is in fullscreen mode, where it also does not allow me to switch ime.. |
Well, I'd suggest to debug either niri directly or fcitx, since chrome just receives things, you can also compare to e.g. firefox, it also uses all of that. |
It is totally fine with firefox though (ime can be invoked correctly under all cases).. I'd assume it is similar when launching chrome with the flag |
I mean, firefox is still gtk3 IIRC, also use GTK_IM_MODULE=wayland for firefox, so it's also text-input-v3, that's what I use at least, since I don't use any fcitx specific input module in anything other than QT, because QT 5 doesn't support text-input-v3. |
I'm launching firefox without the environment According to the wiki
It is maybe unnecessary to set |
|
With the recent promotion of Chrome 129 to the stable channel which finally brings If you are running a single instance (window) of Chrome (or any Chromium based browser version >=129.0.6643.2) then you will never notice the issue. Fcitx5 works as expected, just as good as Firefox. Now if you open a new window every single key input is doubled a → aa, but there is more... If you open yet another window then yeap, every single key input is tripled a→aaa, and it goes from there. The reason I discovered this is because I use a lot of webapps (standalone PWAs == instance windows) so it quickly became apparent that the number of windows open has something to do with the extra unnecessary input. To replicate the issue you can install latest Chrome Canary or any other Chromium based browser (you need to have fctix5 running). For my tests I was using Brave from Flathub:
Simply launch Brave with:
First window should be working without any issues, for example just typing in the address bar using various inputs. Now simply open another window and try the same test, you should be getting doubled output for each key press. Opening another window will triple the output and so forth. Keep in mind that opening an extra window after the first also breaks the input in the first window. For some reason fcitx5 also forgets the input methods (trying to switch only shows the top one in the list). I can confirm that Firefox (flatpak) without any special flags works with fcitx5 under niri with zero issues. Both Brave and Firefox work as expected under Gnome Wayland. I am aware that niri is still young but this issue in combination with #454 are real pain points which make using niri almost unbearable which is a real shame since I love using niri. Now, I am not a Rust programmer (still learning) but If there is anything I can do to help debug and resolve these problems with fcitx5 please let me know. I will be happy to help out as much as I can! Let me know if more info is required. Thank you all for your work on niri! |
Actually it is an another case where a double (multiple) input is triggered.. With chromium 129 now using text-input-v3 there is no double input when entering text in the filter box I mentioned, while on google-chrome-dev this issue still persists, and in both cases the fullscreen danmaku input boxes on bilibili will trigger the double input issue (I do not have any pwa apps or electron apps running). I didn't see the same issue on hyprland, though (with the same chromium flags).. By the way, if multiple chromium instances opened on hyprland, I cannot get any input with fcitx5 and text-input-v3.. |
Could you please try Chrome/Brave under sway with fcitx5 and make sure they are running on Wayland and not Xwayland, to check if the issue is niri specific? |
The plot thickens… I guess we might be dealing with completely different issues then.
I setup a Sway VM using Ubuntu Sway Remix and can confirm that everything is working as expected. To reproduce my setup just do the following:
sudo apt install -y flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo apt install -y fcitx5-mozc fcitx5-config-qt fcitx5-frontend-all
fcitx5-configtool
flatpak install flathub com.brave.Browser
fctix5 --replace
flatpak run com.brave.Browser --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime --wayland-text-input-version=3 Another example showing multiple inputs working as expected (English, mozc) |
Just performed the same tests as above on latest hyrpland (git) and it also works as expected. Multiple Brave intances on hyprland worked just fine, maybe it is worth testing once more since Brave with Chromium 129 was just recently released. |
Reproduced on Niri 0.1.9 with Chromium 130.0.6723.91 |
+1 and with Chromium 131.0.6778.13 |
FYI, according to some discussion in Arch Linux CN group, at least in KWin and wayfire, there is no issue. |
When running on Wayland and not Xwayland? |
I tried to run Chrome with xwayland-run without the wayland flags. This doesn't happen. I believe this issue is very much related to text-input-v3. |
The same problem happened for me on every chromium-based software like edge and chrome. |
Maybe, this is the reason. https://issues.chromium.org/issues/40113488#comment127 |
System Information
Chrome dev which utilizes text-input-v3 has the issue of letters get doubly input for certain input boxes, even when no ime is in use (but no issues when the process of fcitx5 is being killed), for example, the Filters input box (where I typed just one "d" letter)
As suggested in the comment Ozone-wayland: support text_input_v3 protocol, the related log output in terminal is
And it seems there are indeed two key press events when a double input is triggered
While I don't have any other application that utilize text-input-v3 I can test with, and most input boxes in chrome are working fine.
The text was updated successfully, but these errors were encountered: