aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-04-22 09:56:52 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-04-22 09:56:52 +0200
commitdb8450799255e2de37a9cd8c15610211673af6e1 (patch)
tree96295e53c051a7bfea4c75d972baf7107aa6d529 /src/html.cc
parent8ab9de15c7e52f8ab201412649f946b1922b1944 (diff)
disable forms while stylesheets are pending
To avoid lost user input on repush, we disable forms until all stylesheets have been loaded. Also open select widgets cause crashes on repush.
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);