[wp-trac] [WordPress Trac] #12369: jQuery's .live() in post.js binds to all checkboxes

WordPress Trac wp-trac at lists.automattic.com
Thu Feb 25 00:32:39 UTC 2010


#12369: jQuery's .live() in post.js binds to all checkboxes
----------------------------+-----------------------------------------------
 Reporter:  mdawaffe        |       Owner:                  
     Type:  defect (bug)    |      Status:  new             
 Priority:  normal          |   Milestone:  3.0             
Component:  Administration  |     Version:  3.0             
 Severity:  major           |    Keywords:  has-patch commit
----------------------------+-----------------------------------------------
 According to http://api.jquery.com/live/#caveats

 > DOM traversal methods are not fully supported for finding elements to
 send to .live(). Rather, the .live() method should always be called
 directly after a selector, as in the example above.

 post.js uses jQuery's traversal methods to select the taxonomy checkboxes
 and their corresponding popular checkboxes, causing live() to bind all
 checkboxes.

 Attached switches the live() binding to a single selector.

 NB: Attached only modifies post.dev.js.  SCRIPT_DEBUG necessary for
 testing, post.js should be generated by committer.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12369>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list