I use the "Focus Follows Mouse - Mouse Precedence" policy. When I move the mouse from a Firefox window to an other window (they are overlapping), sometimes the other window only gains focus for a moment, and Firefox gains focus back. It also happens sometimes that I'm changing desktops, and on the new desktop no window gets focused, but Firefox on a completely different desktop gets the focus.
well, it's Firefox :-( Browsers tend to be difficult. They are using their own toolkits and implement things differently. All I can suggest is to set a higher focus stealing prevention for Firefox through the window specific rules. Most likely there is not much we can do as Firefox is using legit X calls to regain focus. And if we would be more strict there, other applications would break. It might be interesting to monitor what goes on in the browser when this happens. E.g. did you open a link and it finished loading, stuff like that which might make Firefox try to regain focus.
AFAICT nothing goes on in the browser.
Can't reproduce with: firefox 59.0.2-2 Plasma: 5.12.4 Apps: 17.12.4 Frameworks: 5.44.0 Qt: 5.10.1 Kernel: 4.14.32-1-MANJARO OS: Netrunner Rolling
This issue report is quite old. Can you please confirm, that it still persists with KDE 5.23?
With Plasma 5.23 and Firefox 91 I can no longer reproduce this.