Grid edit: press escape key anywhere to cancel editing
This commit is contained in:
parent
2fd43bafb9
commit
756ae599e9
@ -1253,10 +1253,7 @@
|
||||
}
|
||||
});
|
||||
$(g.cEdit).keydown(function(e) {
|
||||
if (e.which == 27) {
|
||||
// cancel on pressing "Esc"
|
||||
g.hideEditCell(true);
|
||||
} else if (!g.isEditCellTextEditable) {
|
||||
if (!g.isEditCellTextEditable) {
|
||||
// prevent text editing
|
||||
e.preventDefault();
|
||||
}
|
||||
@ -1267,6 +1264,12 @@
|
||||
g.hideEditCell();
|
||||
}
|
||||
});
|
||||
$('html').keydown(function(e) {
|
||||
if (e.which == 27 && g.isCellEditActive) {
|
||||
// cancel on pressing "Esc"
|
||||
g.hideEditCell(true);
|
||||
}
|
||||
});
|
||||
// add table class
|
||||
$(t).addClass('pma_table');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user