10 years ago
10 years ago


(Reporter: BishopOfBorg, Unassigned)


Firefox Tracking Flags

(Not tracked)




10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)

problem with hidden text and checkbox.
hidden text is show up with checked a checkbox, after F5 (refresh) the checkbox is always checked, but the hidden text is hidden.

Reproducible: Always

Steps to Reproduce:
1. click in checkbox
-> shows hidden text
2. press F5
-> checkbox is always checked but text is hidden again!
-> page is mismatch

2.a) press STRG+F5
-> checkbox is not checked .. correct!


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />


<script type="text/javascript">
function show(value)
	if (document.getElementById('box').checked)
		document.getElementById('error').style.display = 'inline';
		document.getElementById('error').style.display = 'none';
<span id="error" style="display:none;">ERROR TEXT ERROR TEXT ERROR TEXT</span>
<br />
<input type="checkbox" name="empty" id="box" value="1" class="checkbox" onclick="show()" /> <label for="box">SHOW TEXT</label>
Actual Results:  
After F5 (Page-Refresh) the checkbox is checked (html sourcecode saying no checked!) and hide text is not showing

Opera working correctly.
IE7 working identically wrong with Firefox.


10 years ago
Component: General → Document Navigation
Product: Firefox → Core
QA Contact: general → docshell
The checkbox state gets restored via the standard codepath for restoring form control state.  Script state is not restored, of course.  It's really the page author's responsibility to sync the two if the page depends on them being in sync...

Looks like everything is working as designed.

Note that holding down Shift while doing F5 or Ctrl-R or clicking the reload button will do a force-refresh which bypasses caches and resets form controls.
Last Resolved: 10 years ago
Resolution: --- → INVALID

Comment 2

10 years ago
restored as designed? restored only controlls but content must with javascript re-sync? thats is poor! hail opera!! (and i a big ff fan)
Yes.  Form controls are restored to the state the user set them to.  We can't restore your JavaScript state, since only you know how it ties to those controls.  It really is your responsibility to handle the syncing.

Last I checked, Opera doesn't restore form state at all, which is poor from the user's perspective, even if it does make your job here easier.
You need to log in before you can comment on or make changes to this bug.