1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 17:44:07 +02:00

Handle keypress instead of keydown (bug #3112458)

This commit is contained in:
Jakub Vrana
2010-11-19 15:07:06 +01:00
parent 293fc0fd60
commit 71438d57c3
7 changed files with 9 additions and 9 deletions

View File

@@ -152,7 +152,7 @@ function selectAddRow(field) {
* @param HTMLInputElement submit button
* @return boolean
*/
function textareaKeydown(target, event, tab, button) {
function textareaKeypress(target, event, tab, button) {
if (tab && event.keyCode == 9 && !event.shiftKey && !event.altKey && !event.ctrlKey && !event.metaKey) {
// inspired by http://pallieter.org/Projects/insertTab/
if (target.setSelectionRange) {
@@ -310,8 +310,8 @@ function selectDblClick(td, event, text) {
rows++;
});
input.rows = rows;
input.onkeydown = function (event) {
return textareaKeydown(input, event || window.event, false, document.getElementById('save'));
input.onkeypress = function (event) {
return textareaKeypress(input, event || window.event, false, document.getElementById('save'));
};
}
if (document.selection) {