Closed
Bug 413
Opened 27 years ago
Closed 24 years ago
history.go(0) emptys hidden fields
Categories
(MozillaClassic Graveyard :: Layout, defect, P2)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: nobody, Unassigned)
Details
Hidden fields are emptied by a call to history.go(0).
Text field are not.. Users expect the behavior of hidden
field to be the same as text field (execpt they are hidden)
To reproduce:
1/ Enter a value in Text field source for "non-hidden" example
2/ Click transfer
3/ Click run 'history.go(0)'
- the value is still here
1/ Enter a value in Text field source for "hidden" example
2/ Click transfer
3/ Click read to see the value in the hidden field
4/ Click run 'history.go(0)'
5/ Click read - The alert is empty.. the value is lost
------- Additional Comments From ludovic 04/08/98 12:21 -------
I love this free source thing.. I've debugged Mozilla and
have a patch to propose..
Check http://champagne.mcom.com/dev/bugs/16/bug.html for
the modified files...
*
* Differences to liblayout to not loose
* the Client-JS modified hidden form values
* when doing history.go(0) (Bug 113155)
*
* Disclaimer: I have no idea if these modification will break
* or not other parts of the layout/js engine.
In function void
lo_CleanFormElementData(LO_FormElementData *element_data)
layfree.c:240d239
< case FORM_TYPE_HIDDEN:
layfree.c:258a258,271
> case FORM_TYPE_HIDDEN:
> {
> lo_FormElementMinimalData *form_data;
>
> form_data = (lo_FormElementMinimalData *)
> element_data;
> if (form_data->name != NULL)
> {
> PA_FREE(form_data->name);
> form_data->name = NULL;
> }
> }
> break;
>
In function static LO_FormElementStruct *
lo_form_input_minimal(MWContext *context, lo_DocState *state,
PA_Tag *tag, int32 type)
layform.c:1276c1276,1278
< form_data->value = lo_FetchParamValue(context, tag, PARAM_VALUE);
---
> if (form_data->type != FORM_TYPE_HIDDEN)
> form_data->value = lo_FetchParamValue(context, tag, PARAM_VALUE);
>
------- Additional Comments From ludovic 04/09/98 02:57 -------
oops.. The default value of the Hidden field is lost in
the first layout with the modifications I did.
This modification should be better
@@ -1236,8 +1236,6 @@
if (form_data->type == FORM_TYPE_NONE)
{
form_data->FE_Data = NULL;
- if (type==FORM_TYPE_HIDDEN)
- form_data->value = lo_FetchParamValue(context, tag, PARAM_VALUE);
}
Comment 1•27 years ago
|
||
The fix that Ludovic proposed is in the tree. Thanks a lot, Ludovic.
Updated•26 years ago
|
Component: Layout
Comment 4•24 years ago
|
||
marking fixed.
Status: REOPENED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•