From a0db0a46b3098a1a904913b217b79c6f6c8dd9d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 13 Dec 2022 00:14:13 +0100 Subject: [PATCH] gluon-web-model: resolve hang when submitting form with disabled element I was made aware of a bug when submitting the form while the element is disabled based on it's dependencies The fix was to inherit from AbstractValue instead of just node AbstractValue's AbstractValue:resolve_node_depends() in particular solves the issue, but it made more sense to just use the full base class --- .../luasrc/usr/lib/lua/gluon/web/model/classes.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua index 88f378c0..93279c3b 100644 --- a/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua +++ b/package/gluon-web-model/luasrc/usr/lib/lua/gluon/web/model/classes.lua @@ -410,11 +410,11 @@ function TextValue:__init__(...) end -local Element = class(Node) +local Element = class(AbstractValue) M.Element = Element function Element:__init__(template, kv, ...) - Node.__init__(self, ...) + AbstractValue.__init__(self, ...) self.default = nil self.size = nil