Modify ↓
Ticket #3343 (closed bug: duplicate)
Webkit: .is(':visible') is false for new nodes
| Reported by: | genezys | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3 |
| Component: | selector | Version: | 1.2.6 |
| Keywords: | Cc: | genezys, flesler | |
| Blocking: | Blocked by: |
Description
Every other browsers returns true when testing .is(':visible') on newly created nodes (like $('<div/>')). WebKit returns false.
So methods that works with .filter(':visible') don't work on new nodes like .hide().
Test case:
$('<p>Should not be visible</p>').hide().appendTo(document.body);
The problem is real because the workaround is to append the nodes in the document and hide them after resulting in a huge performance hit for large trees.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.
