From: Jo-Philipp Wich Date: Sun, 19 Apr 2020 17:34:27 +0000 (+0200) Subject: luci-base: ui.js: fix textarea width X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=acae1378a80ca0f87ec3f29de585a6b6328a2c64;p=oweals%2Fluci.git luci-base: ui.js: fix textarea width Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 4219932b9..50410762f 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -444,7 +444,8 @@ var UITextarea = UIElement.extend(/** @lends LuCI.ui.Textarea.prototype */ { /** @override */ render: function() { - var frameEl = E('div', { 'id': this.options.id }), + var style = !this.options.cols ? 'width:100%' : null, + frameEl = E('div', { 'id': this.options.id, 'style': style }), value = (this.value != null) ? String(this.value) : ''; frameEl.appendChild(E('textarea', { @@ -454,7 +455,7 @@ var UITextarea = UIElement.extend(/** @lends LuCI.ui.Textarea.prototype */ { 'readonly': this.options.readonly ? '' : null, 'disabled': this.options.disabled ? '' : null, 'placeholder': this.options.placeholder, - 'style': !this.options.cols ? 'width:100%' : null, + 'style': style, 'cols': this.options.cols, 'rows': this.options.rows, 'wrap': this.options.wrap ? '' : null