Closed
Bug 179440
Opened 23 years ago
Closed 23 years ago
Using DHTML/Javascript to add to a form inside a table causes loss of data allready input on file input boxes
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla1.3beta
People
(Reporter: Rob.Jones, Assigned: john)
References
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016
Having created a table that contains form input elements.
Using DHTML/Javascript to add more input controls to table/form.
The addition of new input controls causes loss of allready input data
if that data is a file input control.
I attach a file to demo this bug.
Reproducible: Always
Steps to Reproduce:
In attached page....
1. click 'select new file'
2. click browse and choose a file
3. click 'select new file'
Actual Results:
previously existing file input box was cleared.
Expected Results:
kept filename entered in first box.
![]() |
||
Comment 2•23 years ago
|
||
confirming on linux build 2002-11-01-21. jkeiser, I suspect that what's going
on here is that the <span> gets another <span> inserted into it which has a
<table> inside and we reframe the whole mess (because it's an {ib} situation).
Shouldn't the form control persist its state over reframes? Do file controls
fail to store state in the content object because of the security restrictions
or something?
Assignee: jst → form
Status: UNCONFIRMED → NEW
Component: DOM Other → Layout: Form Controls
Ever confirmed: true
OS: Windows 2000 → All
QA Contact: gerardok → tpreston
Strangely....
IF I make the addrow function add this....
html = "";
html += "<span id='test[" + attachmentCount + "]_i'>";
html += "";
html += "Label";
html += "";
html += "<input type='file' name=''>";
html += "";
html += "</span>";
The new boxes do not clobber the file input box.
But if I make the addrow function add this... (added a div)
html = "<div>";
html += "<span id='test[" + attachmentCount + "]_i'>";
html += "";
html += "Label";
html += "";
html += "<input type='file' name=''>";
html += "";
html += "</span></div>";
The file input boxes get clobbered.
Visually the second function is making the table (which is
in the original html code) vertically longer.
Just thought I'd mention this observation incase it helps.
Component: Layout: Form Controls → DOM Other
OS: All → Windows 2000
Think my comment about tables being involved is wrong.
If I format using divs and spans the same problem is experienced
when the addition of code causing the vertical length of the page to
increase.
I attach a second testcase. Very similar to first but without tables.
PS: Every time I have had to add an attachment (before and after recent changes
to bugzilla) I have to log in multiple times. I am allready logged in. I choose
to add attachment, it asks me to log in again, it then says I did not choose
an attachment, I click back and back agian until I see this page and then
submit and it finally works.
Noticed one of my earlier comments caused change of component
back to DOM Other. Have corrected.
Component: DOM Other → Layout: Form Controls
![]() |
||
Comment 6•23 years ago
|
||
Yeah, adding the div sticks a block inside an inline, leading to much finagling
on the part of the layout engine to deal. See comment 2, sentence 2.
Comment 7•23 years ago
|
||
also occurs with linux trunk build 20021109
Keywords: testcase
OS: Windows 2000 → All
Assignee | ||
Comment 8•23 years ago
|
||
It could be some security restriction indeed. I am seeing other problems
restoring with textfields in particular; perhaps this is related.
Assignee: form → jkeiser
Assignee | ||
Comment 9•23 years ago
|
||
This should get fixed with bug 152844
Assignee | ||
Comment 10•23 years ago
|
||
Fixed with bug 152844. This was because the file frame was being destroyed
along with the table.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•