Opened 13 years ago
Closed 12 years ago
#6843 closed bug (fixed)
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)
Change History (5)
Changed 13 years ago by
Attachment: | test-case.html added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 12 years ago by
Owner: | set to lathan |
---|---|
Priority: | → undecided |
Status: | new → pending |
Please provide a reduced jsFiddle test case using jQuery 0 GIT, thanks!
comment:3 Changed 12 years ago by
Priority: | undecided → high |
---|---|
Status: | pending → open |
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
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.
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.