Compatibility issues with dynamic page builders
-
I’m using the Beaver Builder Page Builder (front end visual editor) and Gravity Forms on my site and ran into a problem where the WP-Spamshield javascript causes the visual editor to break.
When using Beaver Builder and editing a page the page has been fully loaded and editing page content uses AJAX to load changes rather than a full page refresh. When updated content is loaded in, including the javascript from the WP-Spamshield rs_wpss_gf_form_append function, the screen is emptied and is just white. This is caused by the document.write call in the rs_wpss_gf_form_append javascript, since the page has already fully loaded document.write clears everything in the body and only writes what was included in the call. This isn’t normally a problem, but since the content is being updated dynamically rather than via page refresh document.write doesn’t work.
Is there any way the echoed javascript code could be changed to not use document.write? Possibly adding an id to the <script> tag and then targeting it to use insertBefore to add the <input> tags?
- The topic ‘Compatibility issues with dynamic page builders’ is closed to new replies.