Skip to main content

Bug Tracker

Side navigation

#7024 closed bug (invalid)

Opened September 10, 2010 09:17PM UTC

Closed October 03, 2010 08:01PM UTC

Null element error when unselecting multiple select options

Reported by: bigredradio Owned by:
Priority: undecided Milestone: 1.4.2
Component: unfiled Version: 1.4.2
Keywords: elems is null Cc:
Blocked by: Blocking:

I am not sure how this is happening, but I found the area that needs to be trapped. When I have a select element with the multiple attribute. When I deselect all options, I get an error "elems is null" at line 648 of 1.4.2 non-minified version.

Here is a possible fix:

Go through the array, only saving the items

that pass the validator function

if (elems == null) return ret;

I need to make updates to the page when no options are selected and the event "change" works properly with this addon. Otherwise I get an error and the change event stops working altogether.

Attachments (0)
Change History (3)

Changed September 10, 2010 09:18PM UTC by bigredradio comment:1

The code wrapped. The only addition is:

if (elems == null) return ret;

Changed September 22, 2010 10:38PM UTC by snover comment:2

need: ReviewTest Case

Please provide a reduced test case.

Changed October 03, 2010 08:01PM UTC by dmethvin comment:3

priority: → undecided
resolution: → invalid
status: newclosed

I'm going to close this ticket until a test case is provided. The error is occurring in jQuery.grep(). The call stack from a test case would make it clear how we got there.