Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Chrome 14 and OSX 10.5.8.

If a website generates a Javascript alert window with a lot of content (like debug information) the bottom of the window disappears off the screen.

This places the buttons out of reach and means there is no way of closing the alert window as the "traffic light" of window buttons doesn't appear in the top left-hand corner.

Having the alert window open disables various actions on Chrome and makes it unusable. The only way I've been able to close the alert window is using "Force Quit" to close Chrome down totally.

Is there anyway of closing a Chrome Javascript alert window that is too big for screen in OSX?

share|improve this question
you can't just hit enter?? generally on an alert the 'ok' has focus by default. i'm not sure about OSX, i'm a windows guy. – rlemon Oct 16 '11 at 21:01
Why would you use alert for debug info? Use console.log - the console was made for debugging. – Zirak Oct 16 '11 at 21:02
Zirak - this is how Silverstripe CMS uses alert boxes for some of it's debugging. – BaronGrivet Oct 16 '11 at 22:30
up vote 6 down vote accepted

@rlemon has got it – activate the alert window and hit Enter. Chrome and Safari on OS X display JavaScript alert boxes with just one button (“OK” by default), which is focused.

share|improve this answer
Thank you, I really should of thought of that. – BaronGrivet Oct 21 '11 at 0:17

If you are getting dialogs which keep looping, you can click the Prevent this page from creating additional dialogs check box via keyboard using this sequence (with alert focused)

Tab, Tab, Spacebar, Enter

This checkbox setting is reset per session according to this answer by by @dentaku.

share|improve this answer
@DavidRicherby this is actually a good answer for when there's recurring dialogs. I've explained it a little more. – Jay Jan 30 at 4:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .