Skip to main content

Bug Tracker

Side navigation

#8700 closed bug (invalid)

Opened March 29, 2011 08:52PM UTC

Closed March 30, 2011 12:41PM UTC

Using conditional expression on drop down menu causes Safari to crash

Reported by: greg@gregstiffler.com Owned by:
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:
Description

If you accidentally set a variable to a dropdown element, instead of the value, and then try using a conditional expression on it, Safari crashes.

Example:

myVar = $('#myDropDown'); //Note that .val() is omitted

if (myVar == 0) {
  doSomething();
}

Obviously this is my fault (or any developer) for not being careful. But it shouldn't crash the browser. Firefox gives the following error:

Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"  location: "JS frame :: http://localhost/npsd/common/js/jquery-1.4.2.min.js :: f :: line 132"  data: no]
Attachments (0)
Change History (1)

Changed March 30, 2011 12:41PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

This is a browser bug and should be reported to Safari developers.