Improve confirm modal keydown listeners

pull/1/head
yflory 5 years ago
parent c0e9e86a9e
commit 44de8a41a1

@ -70,6 +70,7 @@ define([
if (typeof(yes) === 'function') { yes(e); } if (typeof(yes) === 'function') { yes(e); }
break; break;
} }
$(el || window).off('keydown', handler);
}; };
$(el || window).keydown(handler); $(el || window).keydown(handler);
@ -587,7 +588,7 @@ define([
$ok.click(); $ok.click();
}, function () { }, function () {
$cancel.click(); $cancel.click();
}); }, frame);
document.body.appendChild(frame); document.body.appendChild(frame);
setTimeout(function () { setTimeout(function () {

@ -3345,7 +3345,9 @@ define([
// in history mode we want to focus the version number input // in history mode we want to focus the version number input
if (!history.isHistoryMode && !APP.mobile()) { if (!history.isHistoryMode && !APP.mobile()) {
var st = $tree.scrollTop() || 0; var st = $tree.scrollTop() || 0;
if (!$('.alertify').length) {
$tree.find('#cp-app-drive-tree-search-input').focus(); $tree.find('#cp-app-drive-tree-search-input').focus();
}
$tree.scrollTop(st); $tree.scrollTop(st);
} }
$tree.find('#cp-app-drive-tree-search-input')[0].selectionStart = getSearchCursor(); $tree.find('#cp-app-drive-tree-search-input')[0].selectionStart = getSearchCursor();

Loading…
Cancel
Save