Ticket #12219 (closed bug: invalid)
selectOption.remove() leaves empty space in IE6 and crashed when clicked
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.8rc1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
In IE6, calling .remove() on an option removes the option successfully, but leaves a blank space in the select where the option used to be. The hover effect indicates that the option isn't really there. When clicked, the browser crashes.
Offending code:
mySelectBox.find("option[value='" + myOption + "']").remove();
Change History
comment:1 Changed 10 months ago by timmywil
- Owner set to anonymous
- Status changed from new to pending
comment:2 Changed 10 months ago by anonymous
- Status changed from pending to new
I tried to recreate this bug in jsFiddle but could not. Must be something else in the js or css causing this. To resolve, I had force the html to rerender by doing:
var html = mySelectContainer.html(); mySelectContainer.html(html);
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.