diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index f6f8c1b2..fadc0303 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -165,9 +165,9 @@ username.form['auth[driver]'].onchange(); */ function selectQuery($query) { global $jush, $token; - return "

" + return "

" . "" . h(str_replace("\n", " ", $query)) . "" - . " " . lang('Edit') . "" + . " " . lang('Edit') . "" . "

\n"; //

- required for IE9 inline edit } diff --git a/adminer/static/editing.js b/adminer/static/editing.js index 6250eab9..78a08f81 100644 --- a/adminer/static/editing.js +++ b/adminer/static/editing.js @@ -203,11 +203,11 @@ function selectFieldChange(form) { * @param MouseEvent * @param HTMLSpanElement * @param string -* @return boolean */ function selectEditSql(event, el, label) { - if (isCtrl(event) || event.altKey) { - return false; + var a = parentTag(event.target || event.srcElement, 'a'); + if (!isCtrl(event) || (a && a.href)) { + return; } var sql = el.firstChild; var input = document.createElement('input'); diff --git a/adminer/static/functions.js b/adminer/static/functions.js index fc05ec9e..22064fcb 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -40,12 +40,12 @@ function selectValue(select) { /** Get parent node with specified tag name. * @param HTMLElement - * @param string + * @param string regular expression * @return HTMLElement */ function parentTag(el, tag) { var re = new RegExp('^' + tag + '$', 'i'); - while (!re.test(el.tagName)) { + while (el && !re.test(el.tagName)) { el = el.parentNode; } return el; diff --git a/changes.txt b/changes.txt index 2a10c564..85e1cdaa 100644 --- a/changes.txt +++ b/changes.txt @@ -1,6 +1,6 @@ Adminer 3.6.4-dev: Display pagination on a fixed position -Display select SQL edit form inline +Display SQL edit form on Ctrl+click on the select query Recover original view, trigger, routine if creating fails Allow loading more data with inline edit (bug #3605531) Stay on the same page after deleting rows (bug #3605845)