diff options
author | James Bursa <james@netsurf-browser.org> | 2003-12-11 19:06:39 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2003-12-11 19:06:39 +0000 |
commit | 086d66c9a15f6b2752c27b1f30f4c7dfa2ea3183 (patch) | |
tree | 98d8e12b2d7265d663982328d3fbca1ef8aa7d36 /render/box.c | |
parent | 9805610091b0ffe0795db0430226d846d7493587 (diff) | |
download | netsurf-086d66c9a15f6b2752c27b1f30f4c7dfa2ea3183.tar.gz netsurf-086d66c9a15f6b2752c27b1f30f4c7dfa2ea3183.tar.bz2 |
[project @ 2003-12-11 19:06:39 by bursa]
Fix submit outside form crash.
svn path=/import/netsurf/; revision=426
Diffstat (limited to 'render/box.c')
-rw-r--r-- | render/box.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/render/box.c b/render/box.c index fcd2f536f..e62fd0cd7 100644 --- a/render/box.c +++ b/render/box.c @@ -766,6 +766,8 @@ struct result box_textarea(xmlNode *n, struct status *status, box->gadget->type = GADGET_TEXTAREA; if (status->current_form) form_add_control(status->current_form, box->gadget); + else + box->gadget->form = 0; style->display = CSS_DISPLAY_INLINE_BLOCK; /* split the content at newlines and make an inline container with an @@ -817,6 +819,8 @@ struct result box_select(xmlNode *n, struct status *status, gadget->type = GADGET_SELECT; if (status->current_form) form_add_control(status->current_form, gadget); + else + gadget->form = 0; gadget->data.select.multiple = false; if ((s = (char *) xmlGetProp(n, (const xmlChar *) "multiple"))) { @@ -1022,6 +1026,8 @@ struct result box_input(xmlNode *n, struct status *status, if (gadget != 0) { if (status->current_form) form_add_control(status->current_form, gadget); + else + gadget->form = 0; gadget->name = (char *) xmlGetProp(n, (const xmlChar *) "name"); add_gadget_element(status->elements, gadget); } @@ -1103,6 +1109,8 @@ struct result box_button(xmlNode *n, struct status *status, if (status->current_form) form_add_control(status->current_form, box->gadget); + else + box->gadget->form = 0; box->gadget->box = box; box->gadget->name = (char *) xmlGetProp(n, (const xmlChar *) "name"); box->gadget->value = (char *) xmlGetProp(n, (const xmlChar *) "value"); |