mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Reset forms after reloading a document.
This is a fix for the bug from bugzilla, but I don't remember the bug number now. Forms are reset when new documents are loaded or old ones are reloaded. Because of gradual rerendering forms may be reset a few times before a document is fully loaded, what may be annoying.
This commit is contained in:
parent
9362dfb9ae
commit
ede61c1222
@ -36,6 +36,7 @@
|
||||
#include "util/memory.h"
|
||||
#include "util/string.h"
|
||||
#include "viewer/text/festival.h"
|
||||
#include "viewer/text/form.h"
|
||||
#include "viewer/text/view.h"
|
||||
#include "viewer/text/vs.h"
|
||||
|
||||
@ -328,6 +329,8 @@ render_document(struct view_state *vs, struct document_view *doc_view,
|
||||
if (document) {
|
||||
doc_view->document = document;
|
||||
} else {
|
||||
struct form *form;
|
||||
|
||||
document = init_document(cached, options);
|
||||
if (!document) return;
|
||||
doc_view->document = document;
|
||||
@ -359,6 +362,9 @@ render_document(struct view_state *vs, struct document_view *doc_view,
|
||||
#ifdef CONFIG_CSS
|
||||
document->css_magic = get_document_css_magic(document);
|
||||
#endif
|
||||
foreach (form, document->forms) {
|
||||
do_reset_form(doc_view, form);
|
||||
}
|
||||
}
|
||||
#ifdef CONFIG_ECMASCRIPT
|
||||
if (!vs->ecmascript_fragile)
|
||||
|
Loading…
Reference in New Issue
Block a user