[XBLFC] JavaScript-generated form.select displays focus incorrectly

RESOLVED INVALID

Status

()

Core
Layout: Form Controls
P2
major
RESOLVED INVALID
16 years ago
7 years ago

People

(Reporter: Markus Berg, Unassigned)

Tracking

({testcase})

Trunk
x86
All
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020326
BuildID:    20020326

When generating a <SELECT>-element using JavaScript and making one <OPTION>
selected, nothing is displayed in the <SELECT> element. In order for it to
display correctly, you have to choose another <OPTION>.and then go back to the
originally selected one.

Reproducible: Always
Steps to Reproduce:
1. Generate a <SELECT> element with JavaScript
2. Generate one of the <OPTION>-elements as "selected"


Actual Results:  The <SELECT>-element is incorrectly displayed. 

Expected Results:  The "selected" <OPTION> should be visible.

Comment 1

16 years ago
WFM 2002041603 NT4
www.kelvin.nu unreachable, reporter can you attach your testcase to this bug
report please?
(Reporter)

Comment 3

16 years ago
Works on build 20020318 (Solaris 2.6)
Verified bug on build 20020322 (Solaris 2.6)
Works on build 20020417 (Linux 2.4.7, RedHat 7.2)

Looks like it comes and goes... testcase follows:

<p>This is a regular drop-down menu: 
<select name="Menu1">
<option>Option1
<option>Option2
<option>Option3
<option>Option4
<option>Option5
<option>Option6
<option>Option7
<option selected>Option8
<option>Option9
<option>Option10
<option>Option11
<option>Option12
<option>Option13
<option>Option14
</select>
</p>

<p>This identical drop-down menu is JavaScript generated: 

<script LANGUAGE="JavaScript1.2">
document.write("<SELECT name=\"Menu2\" stylesize=\"width: 100%\">");
document.write("<OPTION>Option1");
document.write("<OPTION>Option2");
document.write("<OPTION>Option3");
document.write("<OPTION>Option4");
document.write("<OPTION>Option5");
document.write("<OPTION>Option6");
document.write("<OPTION>Option7");
document.write("<OPTION selected>Option8");
document.write("<OPTION>Option9");
document.write("<OPTION>Option10");
document.write("<OPTION>Option11");
document.write("<OPTION>Option12");
document.write("<OPTION>Option13");
document.write("<OPTION>Option14");
document.write("</SELECT>");
</SCRIPT>
</p>
Created attachment 79666 [details]
above testcase
(Reporter)

Comment 5

16 years ago
Created attachment 79674 [details]
Slight HTML correction of testcase

During verification/testing of this bug, I accidentally introduced an HTML-bug
in my testcase (ironically affecting IE). This attachment posted for
correctness.

Comment 6

16 years ago
That testcase WFM, 2002041617... however, I have seen this bug before.  Recently
fixed?
linux: identical behaviour in latest trunk and branch builds
(2002-04-16-17-1.0.0, 2002-04-17-07-trunk)

1. load testcase
2. both <option/>s should show Option8 selected

- Always works with xbl form controls disabled (in edit->prefs->debug)
- fails with xblfc enabled
  - works on reload, fails with first load and shift-reload.

Reporter, are you using XBL form controls?
Summary: JavaScript-generated form.select displays focus incorrectly → [XBLFC] JavaScript-generated form.select displays focus incorrectly
->htmlfc,new
Assignee: jst → rods
Status: UNCONFIRMED → NEW
Component: DOM HTML → HTML Form Controls
Ever confirmed: true
QA Contact: stummala → tpreston
(Reporter)

Comment 9

16 years ago
Am I using XBL form controls? Not to my knowledge. I'm using Ximian-distributed
Mozilla which unfortunately lacks the debug menus and preferences... sorry.

Comment 10

16 years ago
-> bryner
Assignee: rods → bryner
OS: Linux → All
Markus, you can point Mozilla to about:config and look at the value of
nglayout.debug.enable_xbl_forms
(Reporter)

Comment 12

16 years ago
nglayout.debug.enable_xbl_forms false
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.1alpha

Comment 13

15 years ago
Reproduced in 1/03/03 Trunk with xbflc enabled. Testcase keyword added. 
Keywords: testcase
Assignee: bryner → nobody
Status: ASSIGNED → NEW
QA Contact: tpreston → layout.form-controls
Target Milestone: mozilla1.1alpha → ---
XBL form control bugs are no longer *especially* relevant to anyone.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.