Skip to main content

Bug Tracker

Side navigation

#3223 closed bug (invalid)

Opened August 05, 2008 11:32AM UTC

Closed August 15, 2008 02:09PM UTC

Problems with select box append

Reported by: ipr101 Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

I have created an html page (attached) that contains two list boxes. On selecting an element in the top list box and clicking the 'test' button an element is moved to the bottom listbox. The following code is then run to select the bottom option in the lower listbox -

document.getElementById('bSelect').options[document.getElementById('bSelect').options.length-1].selected = 'true';

In IE7 the element is not selected as requested, the code works as expected within Firefox.

Attachments (1)
  • lb.htm (3.6 KB) - added by ipr101 August 05, 2008 11:33AM UTC.
Change History (4)

Changed August 05, 2008 11:36AM UTC by ipr101 comment:1

Sorry - the description is not clear. The last sentence should read -

In IE7 the element is selected as requested but the listbox does not scroll down to reveal the selected element. The code works as expected within Firefox.

Changed August 14, 2008 10:40PM UTC by nathanhammon comment:2

I've reviewed your test case. The problem you're describing is a user-agent difference in how they adjust the scroll position of a <select> that has had an option element selected programmatically. It is successfully selecting the element in IE7 but by user-agent decision, it doesn't adjust which options are visible. This is not a jQuery bug, nor is it a bug in IE.

Ariel, this ticket can be closed as invalid.

Changed August 15, 2008 08:23AM UTC by ipr101 comment:3

Thanks for your feedback. If I remove the jquery append call from the javascript function, then IE will select the bottom selectbox element and scroll the select box position so the selected box is visible. This is what lead me to believe it was jquery bug, as IE's behaviour appaers to change after the jquery append call is made.

Changed August 15, 2008 02:09PM UTC by john comment:4

resolution: → invalid
status: newclosed