• In the bindEvent() function, Popups for Divi removes other event handlers when it calls the jQuery.off() method:
    return t.not(".et_pb_section.popup,.area-outer-wrap,.divi-area-wrap").not("[" + a + "]").attr(a, e.theId(!0)).off(i).on(i, this.run);

    This should not happen. In my case, it completely breaks Divi Split testing feature. If the intended goal is to prevent opening a link/button then it can be achieved with Event.preventDefault().

Viewing 5 replies - 1 through 5 (of 5 total)
  • Rohit Bhardwaj

    (@mrrohitbhardwaj)

    Hi @matt_fw,

    Did your issue get resolved? If you still require assistance, please let me know; I will be happy to provide you with any additional help you may need.

    Thank you for your patience and understanding.

    Hello, I am also having this issue. I need to bind an on(“click”) function to the button that launches the popup, but Popups for Divi is turning off all other registered event handlers, and thus cancels my bind. Can you either remove that offending .off() code or provide us with a way to add our actions to the execution list?

    Hi @jenvander,

    Thank you for reaching out to us. Sure, I will be happy to assist you.

    For your information, the current “unbind” logic is hard-coded into the plugin. However, I have forwarded your request to our development team, and they have created a feature request for it to add your actions.

    While I can’t promise a specific date for this feature, I’m happy to let you know it’s high on our priority list.

    Though we expect to deliver it in a timely manner, our devs don’t want to make any false promises in case of any unforeseen circumstances.

    Workaround:

    For now, the best solution might be to add the custom event handlers with a delay, e.g.

    window.setTimeout(function() {
    // add the custom click handler
    }, 1000)

    I hope this information helps. Please do not hesitate to ask any further questions. Thank you.

    Thread Starter matt_fw

    (@matt_fw)

    @rohit Thank you for the reply, it’s great to see updates and to know that you are working on the solution. I appreciate the effort to provide a workaround, but please allow me to point out why it’s not a good solution.

    First, some users might click on buttons right after a page is visible (especially power users). User experience will be inconsistent, for some users the workaround is going to work, for some, it won’t.

    Divi popup event handlers might not have been run yet after 1000 ms – it heavily depends o a particular page. The proposed workaround would assign event handlers only for them to be possibly removed after a while.

    Lastly, users – even if they’re developers – might have no control over when event handlers are attached if the event handlers are attached by other plugins/themes (in my case – Divi itself).

    Hi @matt_fw,

    Thanks. I sincerely appreciate your feedback. I have forwarded your update to our development team and added a note for feature requests to keep this point under consideration. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Popups for Divi removes other click handlers’ is closed to new replies.