Page 1 of 1

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

Posted: Wed Feb 25, 2015 12:34 am
by Logan Wells

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.


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

Posted: Wed Feb 25, 2015 7:13 am
by Maryna Brodina

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.


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

Posted: Wed Feb 25, 2015 8:45 pm
by Logan Wells

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!


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

Posted: Wed Feb 25, 2015 9:03 pm
by Evgene Karachevtsev

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


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

Posted: Fri Feb 27, 2015 11:44 pm
by Logan Wells

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


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

Posted: Tue Mar 03, 2015 4:22 am
by Yurii Orishchuk

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.


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

Posted: Thu Mar 05, 2015 11:11 pm
by Logan Wells

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!