Closed Bug 117247 Opened 24 years ago Closed 23 years ago

select does not restore options when options are changed

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 38486

People

(Reporter: mozilla.7b6g9, Assigned: john)

References

()

Details

(Keywords: testcase, Whiteboard: [jk-restore])

Attachments

(2 files)

after you select an item from a drop-down list in a form, using either MB1 or <Enter>, there's a pause and then the browser (or JS engine?) selects the previous item on the list. Using Mozilla 0.9.7 2001122106 on NT 4.0 SP6a Also broken in Netscape 6.2, works in Netscape 4.78 Note that the URL in question is members only. I've made a much smaller (but still probably larger than it needs to be) test case that reproduces the problem and will attach it. Also, if it ends up being evangelism, it looks like McAfee (or whoever did the page for them) got the code from http://javascript.internet.com/forms/country.html#source (and then modified it slightly), so those people would need to be beat on, too, no, I mean, errr, encouraged to convert to a more portable, standard solution. I see there are a boatload of form/select/JavaScript bugs. I didn't find one that exactly matched my symptoms after looking at quite a few, but this may easily be a duplicate. I'll leave that to somebody who knows the territory better.
-HTML Form Controls (maybe it belongs in DOM?). Confirmed with 122802 mozilla windows build (win2K). I tested mac and linux nightly builds and they do not have this problem. Thanks for the very thorough bug report and reduced test case, Robert.
Assignee: asa → rods
Status: UNCONFIRMED → NEW
Component: Browser-General → HTML Form Controls
Ever confirmed: true
QA Contact: doronr → madhur
mgalli, do you recognize this? if the copied code is widespread and it turns out to not be our bug then you guys might want to investigate the original code.
john, can you take a look?
Assignee: rods → jkeiser
This works for me, I am 98.6% certain it was fixed with bug 112241. Reopen if you are still seeing this.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(this is the original reporter) I'm still seeing this in 0.9.9 (2002031104)
Keywords: testcase
Please try with a nightly. I know of another testcase that was just like this that was very recently fixed. I'll leave this open in the meantime. Thanks :) It still works for me.
(this is the original reporter) still breaks for me with 2002040803. This is kinda out there, but do you think having Large Fonts selected for the system fonts could be related? I see it blamed for many kinds of glitchiness. You might also double check with asa@mozilla.org, who was also apparently able to reproduce it.
While trying to dupe bug #136885, I found this one. The cause of this bug is a window.history.go(0) which was conditionned in the original page by browser==Netscape and OS==Winxx. In the testcase I attached, I condition the history.go(0) by unchecking the checkbox (default). history.go(0) is similar to a reload button. In NS4, since there is no reflow after the page is loaded, it is used to create an "artificial" reflow when a combobox has been modified (see Netscape Javascript 1.3 reference manual). More....
If you don't reload the page, the testcase works perfectly with Mozilla. Mozilla should restore the combo box in the same state as it was before hitting reload or a script makes a history.go(0) (at least for NS4 compatibility). That's what it does when you don't change the structure of the combo box ( remember the selected Index, the check status of checkbox, the content of text box, etc). Changing the summary
Summary: selected item jumps up 1 after onChange (???) → history.go(0) should restore combobox to the same state as just before reload
(this is the original reporter) this problem is still here in 1.0RC3 I suppose it's importance hinges on how commonly used this script is. Unfortunately, an attempt to search for it (searching for africaArray and middleeastArray) using several different engines (google, altavista, hotbot, lycos) seemed to turn up mostly pages where the script was in the text of the page, not contained in <script ...> </script> (is everybody filtering for this kinda stuff now?) Anybody got any ideas for getting a realistic tally on this?
I see what you want. This is memory-intensive and not worth the effort. What we *can* do is provide to developers a mechanism to let them know when the first select is changed, so that they can then change the second select. In Mozilla, actually, if you just change this testcase to call populateCountry(document.globe,document.globe.region.options[document.globe.region.selectedIndex].value) in a script immediately after the <select> (or do it onload) then everything will look just fine. http://mozilla.freezope.org/docnotes/FormBugsFAQ#save_restore_everything *** This bug has been marked as a duplicate of 38486 ***
Status: REOPENED → RESOLVED
Closed: 24 years ago23 years ago
Resolution: --- → DUPLICATE
Summary: history.go(0) should restore combobox to the same state as just before reload → select does not restore options when options are changed
Whiteboard: [jk-restore]
This no longer happens to me with Phoenix 0.5 or Mozilla 1.3 alpha (Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5, Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021212) Which makes me wonder if resolved duplicate is the correct resolution. . . Either way, somebody fixed something - the first attachment no longer exhibits the jump-up-one behavior.
Yeah, sorry--enough major pages came up that we fixed it (we found a way to fix it that wasn't so memory-intensive).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: