mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
ESC to dismiss
This commit is contained in:
parent
04960012ca
commit
4e41fd3d90
1 changed files with 3 additions and 3 deletions
6
main.js
6
main.js
|
@ -149,8 +149,8 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
function close_and_cleanup(e) {
|
function close_and_cleanup(e) {
|
||||||
if (!$.contains($('div#options-window')[0], e.target)) {
|
if (e.type == 'click' && !$.contains($('div#options-window')[0], e.target) || e.type == 'keyup' && e.keyCode == 27) {
|
||||||
$(document).unbind('click', close_and_cleanup);
|
$(document).unbind('click keyup', close_and_cleanup);
|
||||||
|
|
||||||
$('div#options-window').slideUp(function() {
|
$('div#options-window').slideUp(function() {
|
||||||
el.removeClass('active');
|
el.removeClass('active');
|
||||||
|
@ -159,7 +159,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).bind('click', close_and_cleanup);
|
$(document).bind('click keyup', close_and_cleanup);
|
||||||
|
|
||||||
$(this).slideDown();
|
$(this).slideDown();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue