There is an Unfocus add-on that seems to do this well, although right
now it's implemented as a command line option. It's in JavaScript of
course, but how about using the same underlying mechanism? Looking at
the source (save xpi as zip and open components/cmd.js), this appears to
be the code that actually does the unfocusing:
function unfocus() {
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var browserWindow = wm.getMostRecentWindow("navigator:browser");
if(browserWindow.document.commandDispatcher.focusedElement)
browserWindow.document.commandDispatcher.focusedElement.blur()
browserWindow.focus();
browserWindow.focus();
}
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/263435
Title:
Firefox cannot close tab (using Ctrl-w) when flash content is selected
on page
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs