WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#12369 closed defect (bug) (fixed)

jQuery's .live() in post.js binds to all checkboxes

Reported by: mdawaffe Owned by:
Milestone: 3.0 Priority: normal
Severity: major Version: 3.0
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

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.

Attachments (1)

12369.diff (1.5 KB) - added by mdawaffe 4 years ago.

Download all attachments as: .zip

Change History (3)

mdawaffe4 years ago

comment:1 ryan4 years ago

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

(In [13410]) Switch live() binding to a single selector. Props mdawaffe. fixes #12369

comment:2 ryan4 years ago

(In [13411]) Switch live() binding to a single selector. Props mdawaffe. fixes #12369

Note: See TracTickets for help on using tickets.