From 71438d57c3cab6e8541c396e33b2a5321c340e8c Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 19 Nov 2010 15:07:06 +0100 Subject: [PATCH] Handle keypress instead of keydown (bug #3112458) --- adminer/database.inc.php | 2 +- adminer/dump.inc.php | 2 +- adminer/include/editing.inc.php | 2 +- adminer/include/functions.inc.php | 2 +- adminer/select.inc.php | 2 +- adminer/static/functions.js | 6 +++--- editor/include/adminer.inc.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/adminer/database.inc.php b/adminer/database.inc.php index e0d91003..d2baa202 100644 --- a/adminer/database.inc.php +++ b/adminer/database.inc.php @@ -57,7 +57,7 @@ if ($_POST) {

' . h($name) . '
' + ? '
' : '' ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $collate) : ""); ?> diff --git a/adminer/dump.inc.php b/adminer/dump.inc.php index fb9f5188..e59bcda0 100644 --- a/adminer/dump.inc.php +++ b/adminer/dump.inc.php @@ -218,7 +218,7 @@ if (DB != "") { } } } else { - echo ""; + echo ""; } } ?> diff --git a/adminer/include/editing.inc.php b/adminer/include/editing.inc.php index a26d1594..67a715ea 100644 --- a/adminer/include/editing.inc.php +++ b/adminer/include/editing.inc.php @@ -104,7 +104,7 @@ function referencable_primary($self) { * @return null */ function textarea($name, $value, $rows = 10, $cols = 80) { - echo ""; // spellcheck - not valid before HTML5 + echo ""; // spellcheck - not valid before HTML5 } /** Print table columns for type edit diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index ac3b7c55..6cb0a41d 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -649,7 +649,7 @@ function input($field, $value, $function) { } elseif (ereg('blob|bytea|raw|file', $field["type"]) && ini_bool("file_uploads")) { echo ""; } elseif (ereg('text|lob', $field["type"])) { - echo "'; // 1.2em - line-height + echo "'; // 1.2em - line-height } else { // int(3) is only a display hint $maxlength = (!ereg('int', $field["type"]) && preg_match('~^(\\d+)(,(\\d+))?$~', $field["length"], $match) ? ((ereg("binary", $field["type"]) ? 2 : 1) * $match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0)); diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 6ebd71c1..a3e15538 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -351,7 +351,7 @@ if (!$columns) { $editable = is_utf8($val) && $rows[$n][$key] == $row[$key] && !$functions[$key]; $text = ereg('text|lob', $field["type"]); echo (($_GET["modify"] && $editable) || isset($value) - ? "" . ($text ? "" : "") + ? "" . ($text ? "" : "") : "" . $adminer->selectVal($val, $link, $field) ); } diff --git a/adminer/static/functions.js b/adminer/static/functions.js index e40b5d1d..b5450f6e 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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) { diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 42167989..f74aeea8 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -274,7 +274,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 echo '

' . lang('E-mail') . "