Skip to toolbar

Find answers, ask questions, and connect with our
community around the world.

Forums Forums Bug Reports JS bug in "Content Toggle" element

  • JS bug in "Content Toggle" element

     Alexis updated 5 days, 2 hours ago 2 Members · 2 Posts
  • Benno

    Member
    August 1, 2020 at 12:45 pm

    I have the following bug with the “Content Toggle” Element:

    Effects:

    * Opening an Elememt in frontend needs 2 clicks

    * Option “Show only one panel at a time” is not working properly

    * On the console, I get the following JS error:

    front.build.js?ver=2.3.8:70 Uncaught TypeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'. at front.build.js?ver=2.3.8:70 at Array.forEach (<anonymous>) at HTMLDivElement.<anonymous> (front.build.js?ver=2.3.8:66)

    My environment:

    WP 5.4.2, Ultimate Blocks Plugin Version 2.3.8, Browser: Chrome Version 83 (Windows 10)

    Fix:

    In /wp-content/plugins/ultimate-blocks/src/blocks/content-toggle/front.build.js, replace line 70:

    if (!siblingContent.contains("ub-hide")) {

    With:

    if (!siblingContent.contains(instance.querySelector("ub-hide"))) {
    • This discussion was modified 6 days, 11 hours ago by  Benno.
    • This discussion was modified 6 days, 11 hours ago by  Benno.
    • This discussion was modified 6 days, 11 hours ago by  Benno.
  • Alexis

    Member
    August 2, 2020 at 10:18 pm

    Hi @Benno ! Thanks for informing us about this issue. We’ve managed to reproduce it in our end, and we’ve made a fix that’s not far from what you suggested. We’ll be including it in our next release.

    We’ll let you know when it comes out. If you encounter further issues with the plugin, please let us know.

    Regards.

Log in to reply.

Original Post
0 of 0 posts June 2018
Now