31

Sometime I see a question with a few votes to close, and I don't know why (valid question and so on). I usually click on the "close" link to see why other users want to close the question. In most cases it's because the question is a duplicate.

Now with the brand new 10 foot long closing box, I have to scroll down to find the "cancel" button. I'm not a big fan of this. Could we make it so that you can close this box by pressing the "escape" key ?

  • 1
    F5 should work. – Gnoupi Feb 15 '10 at 9:16
  • 5
    @gnoupi it would work, but it's not convenient – marcgg Feb 15 '10 at 9:28
  • status-planned - anyone know when? – adrianbanks May 31 '10 at 23:13
5
+50

How about we also put a little X in the top right-hand corner? This seems like it would be very intuitive for most users, and very quick since you probably just had the mouse-in-hand when hitting the close button.

  • 1
    It's not about being intuitive or not, it's about speed. It's faster to just hit escape than to hunt for a button. – alex Feb 18 '10 at 17:56
  • @alex, Not if you're using the mouse a lot, your hand is probably already on it from hitting the close button (though I love keyboard shortcuts also). – Lance Roberts Feb 18 '10 at 18:01
  • 1
    @alex, maybe you missed what I said about 'top right-hand corner' in relation to what the OP said about having to scroll down to get to the cancel button. This way there is no scrolling. – Lance Roberts Feb 18 '10 at 18:28
  • I think giving the option could be nice for people using mostly their mouse... but I definitively prefer clickyng Escape. Mouses are so 2005 – marcgg Feb 19 '10 at 9:02
9

I definitely agree!

I would even propose to extend this feature request not only to the close box, but to any other pop-up on the site. It can be frustrating if you have to click on the box to make it disappear. A quick tap on the escape-key is the most natural way to close these kind of boxes.

  • The tab completion dialog is another annoying one. It will not go away and it almost completely obscures the "Save Edits" submit button, which makes question cleanup way more of a chore than it needs to be. – Ether Feb 15 '10 at 17:14
6

GreaseMonkey Script, just straight forward.

For fading out effect, attaching .fadeOutAndRemove() to .click event would work.

// ==UserScript==
// @name           Esc to Close Dialog
// @namespace      stackoverflow
// @description    Attach Esc Key to close-popup dialog
// @include        http://stackoverflow.com/questions/*
// @include        http://meta.stackexchange.com/questions/*
// @include        http://serverfault.com/questions/*
// @include        http://superuser.com/questions/*
// ==/UserScript==

$ = unsafeWindow.$;

$(document).keypress(
   function(e){
      if(e.keyCode==27){
         $(".close-cancel").click();
      }
   }
);

You must log in to answer this question.

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