Side navigation
#2090 closed bug (fixed)
Opened December 26, 2007 03:50AM UTC
Closed January 10, 2009 10:30PM UTC
.css() causes error when called on an element not in the DOM on Safari
Reported by: | nostrademons | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.2 |
Component: | core | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In the attached test case, Firefox gives none/none/changed/changed and IE gives none/none/auto/auto, indicating that they at least returned undefined or a default value, respectively. Safari, however, gives none/none/changed/changeme and displays "Undefined value" and "Null value" in the error console, preventing further JavaScript execution.
An undefined return value is fine, but it probably shouldn't throw an exception. A common idiom in the UI classes is 'parseInt($(el).css(prop)) || 0', assigning a default value if the property doesn't exist. This behavior causes the whole widget to break instead of functioning with the defaults (I first noticed it with UI Slider).
Attachments (1)
Change History (1)
Changed January 10, 2009 10:30PM UTC by comment:1
resolution: | → fixed |
---|---|
status: | new → closed |
This appears to work as desired in 1.2.6 for the test case.