Skip to content

jQuery - redundant code in modules/custom-status/lib/custom-status.js #662

@htdat

Description

@htdat

From https://github.com/Automattic/Edit-Flow/pull/649/files#r645296481


Expected/Desired Behavior

Remove the redundancy code.

Code:

http://github.com/Automattic/Edit-Flow/blob/8a52203127b483576410558f940097e583d6ef3d/modules/custom-status/lib/custom-status.js#L84-L87

Details

tl;dr: We can remove this jQuery listener because (1) jQuery selector is no longer found, and (2) there is no issue with custom statuses and Quick Edit right now.

As mentioned in the comment here, this click event is triggered if Quick Edit links are clicked in http://valet-vipgo-3279.test/wp-admin/edit.php

However, Quick Edit is currently a button element. Its HTML looks like this:

<button type="button" class="button-link editinline" aria-label="Quick edit “Add a new post – set this for future” inline" aria-expanded="false">Quick&nbsp;Edit</button>

Also, in the browser console, I can double check that with these functions:

  • jQuery('#the-list a.editinline').length returns 0
  • jQuery('#the-list button.editinline').length returns 20 (or the number of posts on this screen).

That said, I am not seeing any issue with Quick Edit and custom statuses here.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions