From e36fef7d312e226988c9733b03b18089bdf3e295 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Sun, 24 Aug 2025 18:02:58 +0200 Subject: Consider also the current element display:none The display_none flag is only set _after_ the open tag has run, so it will only affect child elements. If the current form input element has a display:none itself, it should be also considered. The new function a_Html_should_display() evaluates both conditions. --- src/form.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/form.cc') diff --git a/src/form.cc b/src/form.cc index d13bff24..62c36d4f 100644 --- a/src/form.cc +++ b/src/form.cc @@ -574,7 +574,7 @@ void Html_tag_open_input(DilloHtml *html, const char *tag, int tagsize) } /* Don't add to textbox if we are under a display:none element */ - if (!S_TOP(html)->display_none) + if (a_Html_should_display(html)) HT2TB(html)->addWidget (embed, html->backgroundStyle()); } dFree(type); @@ -687,7 +687,7 @@ void Html_tag_content_textarea(DilloHtml *html, const char *tag, int tagsize) textres->setEditable(false); Html_add_input(html, DILLO_HTML_INPUT_TEXTAREA, embed, name, NULL, false); - if (!S_TOP(html)->display_none) + if (a_Html_should_display(html)) HT2TB(html)->addWidget (embed, html->backgroundStyle ()); dFree(name); @@ -781,7 +781,7 @@ void Html_tag_open_select(DilloHtml *html, const char *tag, int tagsize) attrbuf); } - if (!S_TOP(html)->display_none) + if (a_Html_should_display(html)) HT2TB(html)->addWidget (embed, html->backgroundStyle ()); Html_add_input(html, type, embed, name, NULL, false); -- cgit v1.2.3