Tools > Options, Content area, "Advanced" button to the right of "Enable JavaScript" should give you the option to allow this behavior. If you're on Linux, the navigation might be slightly different.
Note, it is generally considered best practice to allow the user to choose what window should be in focus.
EDIT:
This is about:config you're referring to: dom.disable_window_flip
In FF 27.0.1 I am able to open a new window with focus by providing window name and option parameters to window.open, and then calling focus.
var wi = window.open('http://www.google.com', 'window_name', 'height=200,width=200');
wi.focus();
Example here: http://jsfiddle.net/CLVh2/
For Chrome support, you'll want to check out: Google Chrome "window.open" workaround?
EDIT: FOR TAB SUPPORT
If you want to open a tab and give the tab focus in FF (27.0.1), and simply calling window.open('url') is not giving you the desired result, try checking the "When I open a new tab, switch to it immediately" option. It can be found in Tools > Options > Tabs