Fix inline editing of empty cells

This commit is contained in:
Jakub Vrana 2018-07-09 16:46:32 +02:00
parent 3d84dcf859
commit cf76ad529b
3 changed files with 6 additions and 3 deletions

View file

@ -1,2 +1,2 @@
<?php <?php
$VERSION = "4.6.3"; $VERSION = "4.6.4-dev";

View file

@ -143,7 +143,7 @@ function selectValue(select) {
*/ */
function isTag(el, tag) { function isTag(el, tag) {
var re = new RegExp('^(' + tag + ')$', 'i'); var re = new RegExp('^(' + tag + ')$', 'i');
return re.test(el.tagName); return el && re.test(el.tagName);
} }
/** Get parent node with specified tag name /** Get parent node with specified tag name
@ -702,7 +702,7 @@ function selectClick(event, text, warning) {
} }
}; };
var pos = event.rangeOffset; var pos = event.rangeOffset;
var value = td.firstChild.alt || td.textContent || td.innerText; var value = (td.firstChild && td.firstChild.alt) || td.textContent || td.innerText;
input.style.width = Math.max(td.clientWidth - 14, 20) + 'px'; // 14 = 2 * (td.border + td.padding + input.border) input.style.width = Math.max(td.clientWidth - 14, 20) + 'px'; // 14 = 2 * (td.border + td.padding + input.border)
if (text) { if (text) {
var rows = 1; var rows = 1;

View file

@ -1,3 +1,6 @@
Adminer 4.6.4-dev:
Fix inline editing of empty cells (regression from 4.6.3)
Adminer 4.6.3 (released 2018-06-28): Adminer 4.6.3 (released 2018-06-28):
Disallow using password-less databases Disallow using password-less databases
Copy triggers when copying table Copy triggers when copying table