搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Firefox steals keyboard input when audio changes

more options

I use firefox to play music, so I usually have a window in the background while I do other things. When playback starts after a pause, or between songs, the playback window often steals keyboard focus. So if I'm typing in another window, I'm interrupted. Very annoying. It happens on at least youtube, navidrome, and jellyfin.

I've found a few others reporting similar issues that suggest setting `mozilla.widget.raise-on-setfocus` to `false` - but this doesn't work for me. How can I figure out what's triggering this keyboard steal so I can fix it?

I'm using firefox esr 102.7.0esr, but it's been happening for a while. I've tried the debian builds and the official firefox.com builds, same behavior. Thanks for any suggestions.

I use firefox to play music, so I usually have a window in the background while I do other things. When playback starts after a pause, or between songs, the playback window often steals keyboard focus. So if I'm typing in another window, I'm interrupted. Very annoying. It happens on at least youtube, navidrome, and jellyfin. I've found a few others reporting similar issues that suggest setting `mozilla.widget.raise-on-setfocus` to `false` - but this doesn't work for me. How can I figure out what's triggering this keyboard steal so I can fix it? I'm using firefox esr 102.7.0esr, but it's been happening for a while. I've tried the debian builds and the official firefox.com builds, same behavior. Thanks for any suggestions.

所有回覆 (5)

more options

It may be the search in page functionality

In Settings> General uncheck "Search for text when you start typing" Tim

more options

Hi Timtak - thanks for the suggestion, that option is already disabled.

more options

I'd guess it's 'media.hardwaremediakeys.enabled'.

more options

Hi TyDraniu - thanks for the suggestion. I tried disabling that, but still get the same behavior.

more options

I now think this could be related to full-screen handling. I've noticed a new issue with youtube.

When I click full-screen on a youtube video, the video doesn't go full screen, and the firefox window loses focus - just like when an audio change triggers it. If I change focus via clicking or alt-tab, the video fixes and goes full screen. But then I can't exit full screen normally - firefox goes full screen too.

I've noticed that these issues don't quite happen on a fresh profile. I started moving the new profile to my old one and haven't found the difference - but this profile is very old, so perhaps there's some weird data there.