Bug Tracker

Modify

Ticket #6843 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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:
Blocking: Blocked by:

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

test-case.html Download (426 bytes) - added by lathan 3 years ago.

Change History

Changed 3 years ago by lathan

comment:1 Changed 3 years ago by dmethvin

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.

comment:2 Changed 3 years ago by rwaldron

  • Owner set to lathan
  • Priority set to undecided
  • Status changed from new to pending

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

comment:3 Changed 2 years ago by jitter

  • Priority changed from undecided to high
  • Status changed from pending to open

comment:4 Changed 2 years ago by jitter

  • Status changed from open to closed
  • Resolution set to fixed

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.