Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#12369 closed defect (bug) (fixed)

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

Reported by: mdawaffe Owned by:
Priority: normal Milestone: 3.0
Component: Administration Version: 3.0
Severity: major Keywords: has-patch commit
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 3 years ago.

Download all attachments as: .zip

Change History (3)

comment:1   ryan3 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   ryan3 years ago

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

Note: See TracTickets for help on using tickets.