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

Update button is not becoming active when Custom Fields are edited without typing into them #3182

Closed
kmgalanakis opened this issue Oct 26, 2017 · 4 comments
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen

Comments

@kmgalanakis
Copy link

kmgalanakis commented Oct 26, 2017

Issue Overview

When editing Custom Fields on the relevant metabox of a page, the update button is not activated unless the user clicks inside one of the fields and types something. This means that if the value of a Custom Field is changed using another way, the user won't get the chance to update the page unless he does a change that will activate the Update button.

Steps to Reproduce (for bugs)

  1. Install Toolset Types
  2. Create a Post Field Group
  3. Add an Image custom field and allow multiple instances of this field.
  4. Add a Date custom field.
  5. Navigate to the Page edit page that uses Gutenberg, and try to add an image to the image gallery.
  6. Try to pick a date using the date picker.

Expected Behavior

The expected behavior would be that when the image is inserted, or the date was chosen through the datepicker the Update button should have been enabled.

Current Behavior

The Update button is not enabled unless you do another action that will enable it.
I'm also adding a link to a video showing the current behavior.
https://www.useloom.com/share/625caa872c944e2e94e4826cba8b1e88

@kmgalanakis
Copy link
Author

On the classic editor, the Update button is always enabled and active. For Gutenberg, it's only activated when there is a change in the edited post/page. Is there a JS event or something else that could notify the editor and the button that there is an unsaved change in the form?

@kevinwhoffman
Copy link
Contributor

Confirming this is the case in Gutenberg 1.6 with ACF meta boxes as well. Opening an existing post and editing meta box content does not trigger the Update button. I have to click into the Gutenberg editor in order for the update Button to become active.

@BE-Webdesign BE-Webdesign added the [Feature] Meta Boxes A draggable box shown on the post editing screen label Nov 2, 2017
@BE-Webdesign
Copy link
Contributor

Thank you for the report. This ties into the "Dirty Detection" for Gutenberg. There were some recent changes to dirty detection, and most likely there was a regression somewhere in there. Handling this detection is also challenging for meta boxes, as they have been developed assuming a request response pattern, as opposed to a client rich app. Depending on how these pieces use the DOM, it can become tricky to detect whether anything has changed.

@aduth
Copy link
Member

aduth commented Mar 1, 2018

Closed by #4184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Meta Boxes A draggable box shown on the post editing screen
Projects
None yet
Development

No branches or pull requests

4 participants