From acae1378a80ca0f87ec3f29de585a6b6328a2c64 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 19 Apr 2020 19:34:27 +0200 Subject: luci-base: ui.js: fix textarea width Signed-off-by: Jo-Philipp Wich --- modules/luci-base/htdocs/luci-static/resources/ui.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- cgit v1.2.3