Closed
Bug 673646
Opened 13 years ago
Closed 11 years ago
Form state restoration restores into the wrong inputs if inputs are dynamically added to the document
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: nparian, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0 Build ID: 20110615151330 Steps to reproduce: Sample code provided - multiple DOM elements are selected via document.getElementId on page load. sometimes page needs to be reloaded to see symptoms Chrome and ID do not have the same symptoms. Actual results: when page is loaded txtTesting 6-10 are filled with values that were set on txtTesting1 - 4 Expected results: txtTesting6-10 should have the default values on load
Reporter | ||
Comment 1•13 years ago
|
||
screen shot image
Updated•13 years ago
|
Attachment #547877 -
Attachment mime type: text/plain → text/html
Comment 2•13 years ago
|
||
I only see the issue if I refresh the page. On initial load it works correctly. If I do Ctrl+Shift+R it works correctly.
Comment 3•13 years ago
|
||
I see the problem after a reload and Mozilla/5.0 (Windows NT 6.1; rv:8.0a1) Gecko/20110723 Firefox/8.0a1 SeaMonkey/2.5a1
Status: UNCONFIRMED → NEW
Component: General → DOM
Ever confirmed: true
Keywords: testcase
Product: Firefox → Core
QA Contact: general → general
Version: 5 Branch → Trunk
Comment 4•13 years ago
|
||
> multiple DOM elements are selected via document.getElementId Actually, no. It's just that form state restoration is restoring into the wrong elements, looks like. You can test this by adding autocomplete="off" to all the elements and seeing the resulting behavior. I suspect the issue here is that the inputs are not in a form, and the google maps stuff adds inputs of its own to the document-global inputs-not-in-a-form list before the inputs in question, which messes up the state-restoration indexing. See related discussion in bug 660549.
Depends on: 660549
Updated•13 years ago
|
Summary: code with Google maps selects multiple input elements when using document.getElementById → Form state restoration restores into the wrong inputs if inputs are dynamically added to the document
Comment 5•13 years ago
|
||
See also bug 311507, of which this is probably a duplicate. Since I'm not 100% sure it is, leaving this open for now.
Is both similar ? https://bugzilla.mozilla.org/show_bug.cgi?id=872119
Comment 7•11 years ago
|
||
The attached test case worksforme. Might have been fixed with bug 737851.
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•