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

feat: added MutationObserver #20

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

chrisbakr
Copy link

Issue

In some cases the icon selector popup is not triggered on click.
Eg: a widget that uses SVG Icon Picker inside ACF repeater field. The widget is used as an item inside a MaxMegaMenu

Solution

  • used MutationObserver to detect changes in the DOM
  • initialize_field() removes existing popups to prevent duplicate popups

Copy link

@theMosaad theMosaad left a comment

Choose a reason for hiding this comment

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

LGTM! Didn't test with a widget inside a MaxMegaMenu but it doesn't seem to alter existing functionality.

@theMosaad theMosaad merged commit 3f3bf0c into smithfield-studio:main Oct 11, 2024
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.

2 participants