WordPress.org

Make WordPress Core

#24951 closed defect (bug) (fixed)

Quick edit always adds class "alternate"

Reported by: iseulde Owned by: helen
Milestone: 3.7 Priority: normal
Severity: trivial Version: 3.6
Component: Quick/Bulk Edit Keywords: needs-patch
Focuses: ui Cc:

Description

Quick editing adds the "alternate" class to the table row, even if it didn't have that class before. This only happens after updating, not after cancelling. Causes grey table rows to turn white in the current style and white rows to turn grey in mp6.
Related forum topic: http://wordpress.org/support/topic/quick-edit-4

Attachments (1)

24951.patch (488 bytes) - added by mordauk 21 months ago.

Download all attachments as: .zip

Change History (11)

comment:1 @knutsp21 months ago

  • Cc knut@… added

comment:2 @iseulde21 months ago

  • Component changed from General to Quick/Bulk Edit

comment:3 @helen21 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 3.7

Confirmed.

comment:4 @helen21 months ago

  • Keywords ui-focus added

comment:5 @mordauk21 months ago

Looks like the single_row() method in class-wp-posts-list-table.php defaults to alternate anytime there is only one item. Since the save request only gets one row, it will always have alternate.

@mordauk21 months ago

comment:6 follow-ups: @mordauk21 months ago

  • Cc pippin@… added

Not sure this is the best way to do it, but it does fix the issue.

comment:7 in reply to: ↑ 6 @iseulde21 months ago

Replying to mordauk:

Not sure this is the best way to do it, but it does fix the issue.

Works great.

comment:8 in reply to: ↑ 6 @hotchkissconsulting20 months ago

Replying to mordauk:

Not sure this is the best way to do it, but it does fix the issue.

Works like a charm for me.

comment:9 @helen20 months ago

Fine with a JS solution, given that quick edit requires JS.

comment:10 @helen20 months ago

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

In 25039:

Make sure quick edited non-alternate list table rows don't become alternate. props mordauk. fixes #24951.

Note: See TracTickets for help on using tickets.