Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
htdat opened this issue Jun 9, 2021 · 0 comments · Fixed by #668
Closed

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

htdat opened this issue Jun 9, 2021 · 0 comments · Fixed by #668

Comments

@htdat
Copy link
Member

htdat commented Jun 9, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant