From a97c45fc9b98afb2276cabea43c26503b0f6d9d4 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 18 Nov 2010 12:09:05 +0100 Subject: [PATCH] Utilize innerText or textContent in inline edit --- adminer/static/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 8ba351f1..8b1b8ef9 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -301,7 +301,7 @@ function ajaxForm(form, data) { function selectDblClick(td, event, text) { td.ondblclick = function () { }; var pos = event.rangeOffset; - var value = (td.firstChild.firstChild ? td.firstChild.firstChild.data : (td.firstChild.alt ? td.firstChild.alt : td.firstChild.data)); + var value = (td.firstChild.alt ? td.firstChild.alt : (td.textContent ? td.textContent : td.innerText)); var input = document.createElement(text ? 'textarea' : 'input'); input.style.width = Math.max(td.clientWidth - 14, 20) + 'px'; // 14 = 2 * (td.border + td.padding + input.border) if (text) {