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

no preview for masonry gallery plugin #762

Closed
dasigna opened this issue Oct 27, 2016 · 5 comments
Closed

no preview for masonry gallery plugin #762

dasigna opened this issue Oct 27, 2016 · 5 comments
Labels
compatibility/3rd-party Indicates a compatibility problem with a 3rd-party plugin or theme.

Comments

@dasigna
Copy link

dasigna commented Oct 27, 2016

as already posted on wp.org there is some issue when using the masonry gallery plugin.

as long as the plugin is activated, there is no preview for gallerys in elementor - the description of the error can be found here.

till now i found no solution and i quite dont understand why the plugin does not render correctly in elementor edit mode.
the thing is, that the customer has no preview for that when editing, which causes weird things trying to edit what can not be seen ...

any help really appreciated! thanks in advance

@pingram3541
Copy link
Contributor

pingram3541 commented Oct 29, 2016

We need to find out if there is a handler we can attach to.

When the editor preview is loaded, the plugin's masonry script executes too early and doesn't find the .gallery elements. If we force a delay to the script as I mentioned here, it works on page load but not when added to the preview initially or when the shortcode/text element is edited.

If we could fire again when these events occur, we could fix this problem. A crude fix is to listen to click events on the preview window as ajaxsuccess isn't passed from the parent to the preview.

This at least allows you to render when Elementor is first open, and when/if you add/edit the shortcode, simply click anywhere in the preview and it should become visible again (click events render the shortcode so this seemed like the most logical event until we have/know-of something more tangible), we just have to delay it long enough for the shortcode to completely render.

kobizz added a commit to kobizz/elementor that referenced this issue Oct 30, 2016
KingYes added a commit that referenced this issue Oct 30, 2016
Hack for jQuery Masonry Image Gallery plugin. Fix #762.
@arielk arielk added the compatibility/3rd-party Indicates a compatibility problem with a 3rd-party plugin or theme. label Oct 31, 2016
@dasigna
Copy link
Author

dasigna commented Nov 2, 2016

saw this was already tweaked with version 0.10.5 - which is absolutely great!! really, really big job!

so it shows up when loading, inserting and editing within elementor as it should (and without the great hack from pingram3541) ... only with one exception:
it does not render as masonry on changes within the editor. this is only done when saving and reloading editor page with browser.
one of us may have overlooked something??

great job anyway so far! loving el more and more and hope i can rely on also in future! :-)

@pingram3541
Copy link
Contributor

Yes, the fix was only css so it would be visible. The masonry script still fires too early and doesn't see the .gallery element(s) yet, so it never gets the special class that binds the masonry effect.

@dasigna
Copy link
Author

dasigna commented Nov 2, 2016

maybe we'll get the plugin author to look after that - i'll try again!

@bainternet
Copy link
Contributor

The only failproof way to get around it is to have Elementor native widget and not depend on a shortcode.

Closing for lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility/3rd-party Indicates a compatibility problem with a 3rd-party plugin or theme.
Projects
None yet
Development

No branches or pull requests

4 participants