Problem/Motivation

Currently the supported submit buttons are hard-coded in the gutenbereg.js file. When integrating modules like Save & Edit or any other custom submit buttons, nothing will happen, because Gutenberg does for all non whitelisted submit buttons. In addition #edit-delete needs to be handled as it is right now, because it's not a support button, but a general link.

e.preventDefault();
e.stopPropagation();

Is there a reason, that they are hard-coded and we're not proceeding all ".form-submit" with an additional parent selector to be precise enough?

Steps to reproduce

Proposed resolution

Support all kind of .form-submit buttons.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

szeidler created an issue. See original summary.

szeidler’s picture

Here's a patch that tries to accomplish it.

szeidler’s picture

This approach unfortunately will not solve for e.g. "Cancel Button", which ads a link, because the patch only addresses submit buttons currently.

szeidler’s picture

Status: Active » Needs review
szeidler’s picture

Status: Needs review » Needs work

The patch does not seem to apply to 8.x-2.1 anymore.

szeidler’s picture

Status: Needs work » Needs review
StatusFileSize
new2.56 KB

Reroll against current state of Gutenberg 8.x-2.x.

marcofernandes’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.