Respect number of lines in inline-edit
This commit is contained in:
parent
7d152fbabf
commit
43b9502ce1
|
@ -410,9 +410,6 @@ function selectDblClick(td, event, text) {
|
||||||
td.ondblclick = function () { };
|
td.ondblclick = function () { };
|
||||||
var pos = event.rangeOffset;
|
var pos = event.rangeOffset;
|
||||||
var value = (td.firstChild.alt ? td.firstChild.alt : (td.textContent ? td.textContent : td.innerText));
|
var value = (td.firstChild.alt ? td.firstChild.alt : (td.textContent ? td.textContent : td.innerText));
|
||||||
if (value == '\u00A0' || td.getElementsByTagName('i').length) { // or i - NULL
|
|
||||||
value = '';
|
|
||||||
}
|
|
||||||
var input = document.createElement(text ? 'textarea' : 'input');
|
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)
|
input.style.width = Math.max(td.clientWidth - 14, 20) + 'px'; // 14 = 2 * (td.border + td.padding + input.border)
|
||||||
if (text) {
|
if (text) {
|
||||||
|
@ -422,6 +419,9 @@ function selectDblClick(td, event, text) {
|
||||||
});
|
});
|
||||||
input.rows = rows;
|
input.rows = rows;
|
||||||
}
|
}
|
||||||
|
if (value == '\u00A0' || td.getElementsByTagName('i').length) { // or i - NULL
|
||||||
|
value = '';
|
||||||
|
}
|
||||||
if (document.selection) {
|
if (document.selection) {
|
||||||
var range = document.selection.createRange();
|
var range = document.selection.createRange();
|
||||||
range.moveToPoint(event.clientX, event.clientY);
|
range.moveToPoint(event.clientX, event.clientY);
|
||||||
|
|
Loading…
Reference in a new issue