fix closing dialogs with <esc>

pull/3523/head
Thibault Duplessis 2017-08-25 09:19:55 -05:00
parent f358142310
commit 858fa28b47
1 changed files with 1 additions and 1 deletions

View File

@ -581,7 +581,7 @@ lichess.topMenuIntent = function() {
};
Mousetrap.bind('esc', function() {
var $oc = $('.lichess_overboard .close');
if ($oc.length) $oc.click();
if ($oc[0]) $oc[0].click();
else $('#ham-plate').click();
return false;
});