Bug Tracker

Ticket #1569 (closed bug: fixed)

Opened 1 year ago

Last modified 1 year ago

create jQuery elemnent for <option> bug

Reported by: LuckyKing Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.2.2 Component: core
Version: 1.1.4 Keywords:
Cc: Needs: Review

Description

If you create a jQuery element by $("<option>"), you will get an element like this: "<option selected />", which the attribute 'selected' will be set as default and cann't be changed.

$(document.createElement('<option>')) is ok.

Attachments

Change History

Changed 1 year ago by davidserduke

Interesting. It appears that in FF2 at least (using firebug) the first option in the select is automatically selected. So in the code with

wrap = [1, "<select>", "</select>"];

you get

div.innerHTML = "<select><option></select>";

which creates the option that is selected. Putting wrap to

wrap = [1, "<select><option>", "</select>"];

would solve the problem on creation but the code isn't set up to unwrap it correctly which would require a special case. Just my observations in case they are useful. :)

Changed 1 year ago by davidserduke

I just thought of one possibility. The wrap could be changed to

wrap = [1, "<select multiple>", "</select>"];

so it won't force the only option to be selected. I'm not sure if there are any other side effects but it is one possible thing to look into if you really want to fix this bug.

Changed 1 year ago by davidserduke

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.2 to 1.2.2

This fix was implemented for #1074 with [3844].

Note: See TracTickets for help on using tickets.