Skip to main content

Bug Tracker

Side navigation

#6843 closed bug (fixed)

Opened July 28, 2010 08:08PM UTC

Closed December 01, 2010 04:52PM UTC

computed Style bug when filtering over text nodes

Reported by: lathan Owned by: lathan
Priority: high Milestone: 1.4.3
Component: css Version: 1.4.2
Keywords: css contents style computed getComputedStyle defaultView Cc:
Blocked by: Blocking:
Description

line 4697 (of jquery1.4.2)

var computedStyle = defaultView.getComputedStyle( elem, null );

This throws an exception when you do contents(':hidden') on an element that has child text nodes. (uncaught exception: [Exception... "Could not convert JavaScript argument arg 0 [nsIDOMViewCSS.getComputedStyle]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: /jquery.js :: anonymous :: line 4697" data: no])

This defaultView.getComputedStyle function does not work on text nodes.

example page attached.

I believe this bug is similiar to #4343 and #6647 both of which were marked invalid due to lack of example.

Attachments (1)
  • test-case.html (0.4 KB) - added by lathan July 28, 2010 08:09PM UTC.
Change History (4)

Changed July 29, 2010 01:47AM UTC by dmethvin comment:1

Thanks for taking the time to track this one down! The NS_ERROR_XPC_BAD_CONVERT_JS error has shown up in a few tickets, but without a clear and simple test case.

Changed October 29, 2010 04:45PM UTC by rwaldron comment:2

owner: → lathan
priority: → undecided
status: newpending

Please provide a reduced jsFiddle test case using jQuery 0 GIT, thanks!

Changed December 01, 2010 04:51PM UTC by jitter comment:3

priority: undecidedhigh
status: pendingopen

Changed December 01, 2010 04:52PM UTC by jitter comment:4

resolution: → fixed
status: openclosed

Ported the test case from the attachment to jsfiddle http://jsfiddle.net/jitter/8ZEcY/

Fails to work in 1.4.2. If you switch to 1.4.3/1.4.4 the error doesn't happen anymore.