Just a small request to allow closing the box using the ESCape key just like Lightbox2 allows. Nice module.

CommentFileSizeAuthor
#4 patch_js_esc_key.patch742 bytesgooddesignusa

Comments

mohammed j. razem’s picture

Assigned: Unassigned » mohammed j. razem
Status: Active » Fixed

Fixed in the new release. Though it won't work on Safari or Chrome.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tugis’s picture

Status: Closed (fixed) » Needs work

"keypress" event doesn't work as stated here (http://code.google.com/p/chromium/issues/detail?id=2606), but "keydown" event works!

I changed on "better_messages.js" file the code to:

$(document).keydown(function(e){
          if (!e) {
            e = window.event;
          }
          switch (e.keyCode) {
            case 27: // esc
              betterMessages.close();
              return false;
          }
});

This is the same implementation as in the module "Popups API" and it works fine in Firefox and Chrome (and I suppose also in IE7+).

gooddesignusa’s picture

StatusFileSize
new742 bytes

here is a patch for the latest dev. I used the code from #3. Thanks tugis

bucefal91’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

The 6.x version is no longer supported.