WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#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 2 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 @knutsp2 years ago

  • Cc knut@… added

comment:2 @iseulde2 years ago

  • Component changed from General to Quick/Bulk Edit

comment:3 @helen2 years ago

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

Confirmed.

comment:4 @helen2 years ago

  • Keywords ui-focus added

comment:5 @mordauk2 years 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.

@mordauk2 years ago

comment:6 follow-ups: @mordauk2 years 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 @iseulde2 years 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 @hotchkissconsulting2 years 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 @helen2 years ago

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

comment:10 @helen2 years 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.