diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 6a61457e..b78d6c16 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -275,7 +275,7 @@ username.form['auth[driver]'].onchange(); if (!$val || ("$val[col]$val[val]" != "" && in_array($val["op"], $this->operators))) { echo "
" . select_input(" name='where[$i][col]' onchange='$change_next'", $columns, $val["col"], "(" . lang('anywhere') . ")"); echo html_select("where[$i][op]", $this->operators, $val["op"], $change_next); - echo "
\n"; + echo "\n"; } } echo "\n"; diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 034b29fc..304952e5 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -311,6 +311,17 @@ function selectAddRow(field) { field.parentNode.parentNode.appendChild(row); } +/** Prevent onsearch handler on Enter +* @param HTMLInputElement +* @param KeyboardEvent +*/ +function selectSearchKeydown(el, event) { + if (event.keyCode == 13 || event.keyCode == 10) { + el.onsearch = function () { + }; + } +} + /** Clear column name after resetting search * @param HTMLInputElement */ diff --git a/changes.txt b/changes.txt index 2dfc2b30..6179ee5c 100644 --- a/changes.txt +++ b/changes.txt @@ -16,6 +16,7 @@ Encrypt passwords stored in session by a key stored in cookie Don't append newlines to uploaded files, bug since Adminer 3.7.0 Don't display SQL edit form on Ctrl+click on the select query, introduced in Adminer 3.6.4 Use MD5 for editing long keys only in supported drivers, bug since Adminer 3.6.4 +Don't reset column when searching for an empty value with Enter, bug since Adminer 3.6.4 Don't execute external JavaScript when verifying version Include JUSH in the compiled version Protect CSRF token against BREACH diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 87a47d3d..dcb41ac7 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -240,7 +240,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5 if (($val["col"] == "" || $columns[$val["col"]]) && "$val[col]$val[val]" != "") { echo "
"; echo html_select("where[$i][op]", array(-1 => "") + $this->operators, $val["op"]); - echo "
\n"; + echo "\n"; $i++; } }