summaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc
index db6f99d5..5b14101f 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -640,7 +640,10 @@ void DilloHtml::finishParsing(int ClientKey)
int DilloHtml::formNew(DilloHtmlMethod method, const DilloUrl *action,
DilloHtmlEnc enc, const char *charset)
{
- DilloHtmlForm *form = a_Html_form_new (this,method,action,enc,charset);
+ // avoid data loss on repush after CSS stylesheets have been loaded
+ bool enabled = bw->NumPendingStyleSheets == 0;
+ DilloHtmlForm *form = a_Html_form_new (this, method, action,
+ enc, charset, enabled);
int nf = forms->size ();
forms->increase ();
forms->set (nf, form);