Apparently it's the keypress event which is not registered through Firefox, using keyup works well across all browsers, thanks for the sample code. The fixed version is:
$(document).keyup(function(e) { if (e.keyCode == 27 && popupStatus == 1) { disablePopup(); } }); On Jun 9, 5:10 pm, waseem sabjee <waseemsab...@gmail.com> wrote: > check this link > > $("#mytextbox").keyup(function(event){ > if (event.keyCode == 27) { > $(this).attr({ value:"Escape" }); > } > > > > }); > On Tue, Jun 9, 2009 at 8:59 PM, Thierry <lamthie...@gmail.com> wrote: > > > I am currently following the image popup example from: > > >http://yensdesign.com/2008/09/how-to-create-a-stunning-and-smooth-pop... > > > The demo is at: > >http://yensdesign.com/tutorials/popupjquery/ > > > If I run the demo on Windows XP on Chrome or Safari, the escape key > > doesn't close the popup window. How do I handle this in jQuery for > > those two browsers?