Logan Wells
Posts: 0
Joined: Sat Oct 11, 2014 12:37 am

Unable to open a popup from a button on a collapse block menu?

So I put a fully functional button on a collapse block header, with the idea the button would operate the same as it did beforehand, but instead it just opens the collapse block, ignoring the button.

Is there a way to evade this problem? The button works fine out of the collapse block header, but inside the header the button is ignored fully when I try to click it.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Unable to open a popup from a button on a collapse block menu?

Hello!

Could you provide a screenshot from editor so we can see where exactly did you put a button? Because I can't reproduce it - builder doesn't allow to put button into collapsible header.

Logan Wells
Posts: 0
Joined: Sat Oct 11, 2014 12:37 am

Unable to open a popup from a button on a collapse block menu?

Thanks for responding so quickly!

Here is when the button works:

Image

I put a grid on the CollBlock, put the button on it, as seen here:
Image

And now when I press the button as it is on the CollBlock, it just collapses/opens it, ignoring the button

Thanks!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Unable to open a popup from a button on a collapse block menu?

Hello Logan,

Could you please clarify, what event do you add on 'Click' event? If it's "Run JavaScript" please show print screen with this code, if not please show what event do you use

Logan Wells
Posts: 0
Joined: Sat Oct 11, 2014 12:37 am

Unable to open a popup from a button on a collapse block menu?

It is an open popup event, thanks once again for responding so quickly!

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Unable to open a popup from a button on a collapse block menu?

Hi Logan,

Unfortunatly you can not do it with builder directly. Cause of collapsible block header is button and not allowed to action buttons(button in the button).

But here is a solution:

  1. on event(when your collapsible is ready for example success service or page show) - add JS event handler.

  2. populate it with following JS code:

    pre

    //Where "mobilebutton_461" is your button component name.
    var button = jQuery('[name="mobilebutton_461"]');

    var onClick = function(evnt){
    evnt.preventDefault();
    evnt.stopPropagation();

    Apperyio("popupName").popup("open");
    };

    button.unbind("click");
    button.bind("click", onClick);

    /pre

    Details: http://prntscr.com/6c247o/direct

    Regards.

Logan Wells
Posts: 0
Joined: Sat Oct 11, 2014 12:37 am

Unable to open a popup from a button on a collapse block menu?

This is an awesome answer!

Thank you so much for responding, once again, as fast as usual.

I tried it, and it does not open the popup, although the collapsible does not extend/collapse when I click the button

Should I stop trying?

Thank you so much for the picture by the way!

***ALSO,

On another thread when I marked it as a glitch, an Appery.io employee said they have reported the bug, and for me to stay tuned, so it is awesome how hard you guys work and how quickly!

Return to “Issues”