WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#15051 closed enhancement (fixed)

Don't let all <thead> checkboxes to function as selector

Reported by: Cimmo Owned by:
Priority: normal Milestone: 3.1
Component: JavaScript Version: 3.0.1
Severity: normal Keywords: has-patch
Cc:

Description

In my plugin: Cimy User Extra Fields I use checkboxes on <thead> but unclukily one function in common.js is picking up any click coming from any checkbox from <thead> and <tfoot>

Since I think this is too much, we can maybe take only the one from '.check-column' if this doesn't break anything else.

Here is my patch, please review it and let me know.

Attachments (1)

check_all_checkboxes.diff (451 bytes) - added by Cimmo 3 years ago.
Patch to solve this issue, to be QAed for regressions

Download all attachments as: .zip

Change History (6)

Cimmo3 years ago

Patch to solve this issue, to be QAed for regressions

comment:1 scribu3 years ago

  • Keywords has-patch added

You can condense that into .find('.check-column:checkbox').

comment:2 scribu3 years ago

Rather: .find('.check-column :checkbox')

comment:3 follow-up: Cimmo3 years ago

I never used JQuery in my life, I just used my common sense and it fixed the issue. The condensed version looks even better if it works the same, but yes the point is, please apply the patch if you like it.

comment:4 in reply to: ↑ 3 scribu3 years ago

  • Milestone changed from Awaiting Review to 3.1

Replying to Cimmo:

I never used JQuery in my life, I just used my common sense and it fixed the issue.

Very good. :)

comment:5 scribu3 years ago

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

(In [15743]) More specific selector for checkbox columns. Props Cimmo for initial patch. Fixes #15051

Note: See TracTickets for help on using tickets.