[Conkeror] conkerer-xr pop up windows
Jeremy Maitin-Shepard
jeremy at jeremyms.com
Sun Jan 6 09:48:02 PST 2008
Brian May <bam at snoopy.apana.org.au> writes:
[snip]
> http://www.quirksmode.org/js/popup.html has a link to
> http://www.quirksmode.org/js/popupex.html called "Open popup"
> Activate this link and click the "Close" link:
> javascript:window.close()
> Now the keyboard is dead in this Conkeror window.
> This doesn't seem to work unless you go to the second page via the
> first page.
Okay, I tracked down the problem, and it is now fixed in the git
repository.
The window.close() call generates a DOMWindowClose event; the default
action Mozilla performs in response to this somehow messes up the
focus.
The solution is to add a capturing handler for this event that calls
preventDefault(), to prevent Mozilla from doing this, and also kills the
buffer if the user preference variable `allow_browser_window_close' is set
to true (as it is by default).
--
Jeremy Maitin-Shepard
More information about the Conkeror
mailing list