For the Mozilla issue, try setting the option mozilla.widget.raise-on-setfocus to false. Go to about:config, create a new boolean option w/ that name, set to false, and restart your browser. I *think* that does what you need.