-
Notifications
You must be signed in to change notification settings - Fork 12
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
CoreImage give wrong caption when lightbox is enable #185
Comments
Hey @MKlblangenois I was able to reproduce. Unfortunately the problem lies with the way the Gutenberg uses the selectors to specify specificity. In our case the attribute definition for caption is:
However when you enable the lightbox, the selector for this will match multiple
If you observe carefully you can see that there are three instances of However in that case I propose we fix the selector so to find only the first child element in the list instead of all figcaption elements.
So what I will do is add a feature request to allow Xpath selectors to be used so that we can extract more accurately the contents of this field. Then we can update the block image attribute to use this new selector type. |
edit: relocated to #186 .
@theodesp I havn't been following this issue too closely, but please keep in mind the general changes to the Block API as you're making these decisions. Between the Interactivity API and Block Bindings API coming up, my gut tells me that we want to be using the HTML parser (assuming there isn't something block-specific to handle Lightbox Images, and to stay away from using Xpath directly. |
When I add caption on Image, if "lightbox" checkbox is checked, graphql show me the caption three times.
Step to reproduce:
Version:
The text was updated successfully, but these errors were encountered: