Skip to content

Multi select gutenberg fix #744

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 2 commits into from
Closed

Conversation

jomurgel
Copy link
Contributor

May address #679, but I was unable to replicate the issue in that task, so I'm unclear.

  • Resolves render issue with the chosen select field on Gutenberg-enabled posts. Select fields, in Gutenberg posts, are returning .is(":visible") or :visible generally, as false on load. Whereas it returns true for non-Gutenberg posts. Unclear why that would be, but removing the :visible qualifier resolves initializing Chosen.js on the sidebar.
  • Removes the width of 350px and replaces with max_width: '100%' which works both in Gutenberg and non-Gutenberg posts to prevent the select dropdown from expanding past its bounds. Chosen already sets the width inline, this prevents miscalculation overages.

@gfargo
Copy link

gfargo commented Apr 26, 2019

Hey @jomurgel,

Looks like this issue also extends to single autocomplete fields as well.

By removing :visible from fieldmanager-automcomplete.js here resolves the issue there as well.

Edit:

Just seeing #710 was created to handle single autocomplete fields in Gutenberg. #717 was created to address this issue. Think we can keep this PR limited to addressing the issues with the Chosen library.

@gfargo gfargo added Gutenberg bug Something isn't working labels Apr 26, 2019
Copy link

@pattiereaves pattiereaves left a comment

Choose a reason for hiding this comment

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

🦄

@jomurgel
Copy link
Contributor Author

PR #729 might be a better solution for resolving the issues with the autocomplete field/sortable field behavior on load. A replacement for that part of this PR vs removing the :visible selector check right off.

There was quite a bit of discussion about the implications around removing that check altogether, though in my testing, that did not seem to have any real-world effects on rendering/initting fields in Gutenberg or 4.9- WP installs with fields shown or hidden.

@kevinfodness
Copy link
Member

Fixed via #757

@jomurgel jomurgel deleted the multi-select-gutenberg-fix branch November 2, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Gutenberg
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants