Skip to content

DIVE-131 Add Gutenberg support for dynamic fields #717

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

Closed
wants to merge 9 commits into from

Conversation

kevinfodness
Copy link
Member

  • Modifies selectors that instantiate dynamic functionality (e.g., datepickers, color pickers, autocomplete, etc) to explicitly check whether they are within a proto block rather than performing a naïve check based on :visible.
  • Adds polyfills for Element.matches and Element.closest to efficiently enable the parent check.
  • Adds package.lock for Node modules.

Fixes #713
Fixes #710

Copy link
Member

@goodguyry goodguyry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎸

@@ -1,5 +1,34 @@
var fm = {};

/**
* Polyfill Element.matches, if necessary.
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link should be https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific matches polyfill was taken from the closest polyfill page, which is slightly different from the one present on the matches polyfill page you linked above. I'm only including it because closest depends on it, so I'm pulling both polyfills from the same location. Good catch, though!

@benpbolton benpbolton force-pushed the DIVE-131-gutenberg-datepicker branch from ad1701e to 9c95ec0 Compare November 28, 2018 20:26
@dlh01 dlh01 mentioned this pull request Dec 12, 2018
# Conflicts:
#	.gitignore
#	package.json
@psorensen
Copy link

@kevinfodness Just tested this locally and it works great to fix the autocomplete bug. Any idea if/when this will be merged?

@kevinfodness
Copy link
Member Author

Closing in favor of #757

@kevinfodness kevinfodness deleted the DIVE-131-gutenberg-datepicker branch April 8, 2020 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fieldmanager_Datepicker field JavaScript does not work with Gutenberg enabled Autocomplete fields don't work in side context in Gutenberg
3 participants