aboutsummaryrefslogtreecommitdiff
path: root/src/form.cc
diff options
context:
space:
mode:
authorRodrigo Arias Mallo <rodarima@gmail.com>2025-08-24 18:25:13 +0200
committerRodrigo Arias Mallo <rodarima@gmail.com>2025-08-30 16:08:34 +0200
commitd50233962821c1d678df0618d6d29f4e8c0eb596 (patch)
tree5bfdf81c9a707242c2e578eb8fe2bde2f30ab649 /src/form.cc
parente36fef7d312e226988c9733b03b18089bdf3e295 (diff)
Avoid breaking paragraph in forms with display:none
Diffstat (limited to 'src/form.cc')
-rw-r--r--src/form.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/form.cc b/src/form.cc
index 62c36d4f..b96cec4c 100644
--- a/src/form.cc
+++ b/src/form.cc
@@ -343,7 +343,9 @@ void Html_tag_open_form(DilloHtml *html, const char *tag, int tagsize)
char *charset, *first;
const char *attrbuf;
- HT2TB(html)->addParbreak (9, html->wordStyle ());
+ /* Don't break paragraph if the form is under display:none */
+ if (a_Html_should_display(html))
+ HT2TB(html)->addParbreak (9, html->wordStyle ());
if (html->InFlags & IN_FORM) {
BUG_MSG("Nested <form>.");