luci-mod-network: fix vlan filter matrix overflow after redraw
authorJo-Philipp Wich <[email protected]>
Sat, 12 Jun 2021 20:08:13 +0000 (22:08 +0200)
committerJo-Philipp Wich <[email protected]>
Sat, 12 Jun 2021 20:10:15 +0000 (22:10 +0200)
Ensure that the overflow styles are reapplied after a redraw. This also
simplifies the code as a side-effect.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 7a781d9cd8ab783dd7a5c72f154b972a9ea9aa98)

modules/luci-mod-network/htdocs/luci-static/resources/tools/network.js

index b134390a42572663aa3b453c880404c97bbbc274..67aecf262cad267d399f548efc9f190e393c5a80 100644 (file)
@@ -825,14 +825,6 @@ return baseclass.extend({
 
                o = this.addOption(s, 'bridgevlan', form.SectionValue, 'bridge-vlan', form.TableSection, 'bridge-vlan');
                o.depends('type', 'bridge');
-               o.renderWidget = function(/* ... */) {
-                       return form.SectionValue.prototype.renderWidget.apply(this, arguments).then(L.bind(function(node) {
-                               node.style.overflowX = 'auto';
-                               node.style.overflowY = 'hidden';
-
-                               return node;
-                       }, this));
-               };
 
                ss = o.subsection;
                ss.addremove = true;
@@ -855,6 +847,8 @@ return baseclass.extend({
 
                ss.render = function(/* ... */) {
                        return form.TableSection.prototype.render.apply(this, arguments).then(L.bind(function(node) {
+                               node.style.overflow = 'auto hidden';
+
                                if (this.node)
                                        this.node.parentNode.replaceChild(node, this.node);