Open Bug 1751215 Opened 3 years ago Updated 2 months ago

Form values accessed in script are not the same as shown on screen after page reload

Categories

(Firefox :: Session Restore, defect, P2)

Firefox 96
defect

Tracking

()

Tracking Status
firefox-esr91 --- disabled
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix
firefox102 --- wontfix
firefox103 --- wontfix
firefox104 --- wontfix

People

(Reporter: jelwray, Unassigned, NeedInfo)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0

Steps to reproduce:

  1. Make a change to a form select and checkbox on a web form
  2. Get values of above form fields in script
  3. Close browser window
  4. Re-open browser window
  5. Form field value changes made in step 1 persist (on screen)
  6. Repeat step 2

Actual results:

The form field values retrieved in step 6 above, from script, are not the same as those shown on screen, i.e. the changed values, insead they are the default values.

Expected results:

I would expect the form values in script to be the same as those shown on screen. Issue occurs on Android FF browser also.

I have made a demo here to illustrate:
https://jeremywray.co.uk/bug/firefox_bug_test.html

I can reproduce the issue in Nightly98.0a1 Windows10.
Disabling fission fixes the issue.

Blocks: fission
Status: UNCONFIRMED → NEW
Component: Untriaged → Session Restore
Ever confirmed: true
Keywords: regression
Severity: -- → S3
Priority: -- → P2

Andrei Cculd we get a more precise bisection? Thanks

Flags: needinfo?(andrei.vaida)
QA Whiteboard: [qa-regression-triage]

Hi,

As far as I can tell, the issue has been there ever since fission landed, I've enabled it on a build from 2020-01-01 and the issue was reproducible.

Flags: needinfo?(andrei.vaida)

(In reply to Peter_M from comment #3)

Hi,

As far as I can tell, the issue has been there ever since fission landed, I've enabled it on a build from 2020-01-01 and the issue was reproducible.

We want to know what patch introduced the regression before fission was activated, can you please use mozregression with the fission pref set to find it out please? Thanks

Flags: needinfo?(peter.magyari)
Flags: needinfo?(peter.magyari)
QA Whiteboard: [qa-regression-triage]

farre, this bug looks like a regression from your fix for SessionStoreListener bug 1572084.

Flags: needinfo?(afarre)

Andreas is finishing his big patches around session store in https://bugzilla.mozilla.org/show_bug.cgi?id=1739450
Let's see if this issue will be resolved along.

Regressed by: 1572084

Set release status flags based on info from the regressing bug 1572084

Hi, do you still see this issue on the latest nightly? I seemed to not see this with https://jeremywray.co.uk/bug/firefox_bug_test.html
After I restarted a window, the values on the checkbox or read from script were all set back to default. So they were consistent. Thank you.

Flags: needinfo?(alice0775)

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #9)

Hi, do you still see this issue on the latest nightly? I seemed to not see this with https://jeremywray.co.uk/bug/firefox_bug_test.html
After I restarted a window, the values on the checkbox or read from script were all set back to default. So they were consistent. Thank you.

I can still reproduce this on Nightly102.0a1(20220503094208) Windpes10.

Flags: needinfo?(alice0775)

This happens, I think, because we get the load event before we restore the page. If you look at the value in the debugger, you'll see that document.querySelector("select").value indeed contains the correct value after closing a tab, and undoing the close. Even though the value as read when the load event fires hasn't been restored.

This makes me suspect that it has more to do with restoring than collecting, and could then be a bug due to any of the bugs listed in bug 1751215.

On the other hand, I'm not sure that we've ever restored session store data before load is complete. That would make it impossible to know that all the form elements to restored were loaded to begin with. Maybe we've changed behavior to restore after the load event fires, and that that was different than before Fission. But I'm not sure of that. Adding :dao, who maybe knows.

It's fully possible that this might be intended behavior.

Flags: needinfo?(afarre) → needinfo?(dao+bmo)
You need to log in before you can comment on or make changes to this bug.