mirror of
https://github.com/vrana/adminer.git
synced 2025-08-30 09:39:51 +02:00
Fix the width of inline edit field
This commit is contained in:
@@ -25,6 +25,7 @@ pre { margin: 1em 0 0; }
|
|||||||
pre code { display: block; font-size: 100%; }
|
pre code { display: block; font-size: 100%; }
|
||||||
pre, textarea { font: 110%/1.25 monospace; }
|
pre, textarea { font: 110%/1.25 monospace; }
|
||||||
pre.jush { background: #fff; }
|
pre.jush { background: #fff; }
|
||||||
|
input, textarea { box-sizing: border-box; }
|
||||||
input, select { vertical-align: middle; }
|
input, select { vertical-align: middle; }
|
||||||
input.default { box-shadow: 1px 1px 1px #777; }
|
input.default { box-shadow: 1px 1px 1px #777; }
|
||||||
input.required { box-shadow: 1px 1px 1px red; }
|
input.required { box-shadow: 1px 1px 1px red; }
|
||||||
|
@@ -716,9 +716,13 @@ function selectClick(event, text, warning) {
|
|||||||
td.innerHTML = original;
|
td.innerHTML = original;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var pos = event.rangeOffset;
|
|
||||||
var value = (td.firstChild && td.firstChild.alt) || td.textContent || td.innerText;
|
let pos = event.rangeOffset;
|
||||||
input.style.width = Math.max(td.clientWidth - 14, 20) + 'px'; // 14 = 2 * (td.border + td.padding + input.border)
|
let value = (td.firstChild && td.firstChild.alt) || td.textContent || td.innerText;
|
||||||
|
const tdStyle = window.getComputedStyle(td, null);
|
||||||
|
|
||||||
|
input.style.width = Math.max(td.clientWidth - parseFloat(tdStyle.paddingLeft) - parseFloat(tdStyle.paddingRight), 20) + 'px';
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
var rows = 1;
|
var rows = 1;
|
||||||
value.replace(/\n/g, function () {
|
value.replace(/\n/g, function () {
|
||||||
|
Reference in New Issue
Block a user