I seem to recall this issue previously and am wondering if it's an issue with the simple state machine library not firing on breakpoint change. Are there any JS errors present in developer tools? And are you able to see if the breakpoint code ever runs correctly on breakpoint change?
The call to that method shouldn't really be done manually. The point of the simple state machine library is that it responds to breakpoints and runs the relevant function call when a breakpoint is crossed, so the initSm method should ONLY be run when in a small breakpoint, and then the initLg should be run when you move to/start in the larger breakpoint.
Maybe upgrading the simple state machine library in the master layout file to a newer version might fix it. This it the library in question https://github.com/jonathan-fielding/SimpleStateManager there appears to be a bunch of newer versions.
I actually just downloaded the latest version of SimpleStateManager (https://github.com/jonathan-fielding/SimpleStateManager/releases/tag/3.1.3) and integrated the ssm.min.js into the project and referenced it. Works for me.
Order summary does not expand (mobile view)
Vendr v1.5.1 Umbraco version 8.11.1
Summary does not expand when clicked.
I can fix it by calling initSm(); in the vendrcheckout.js but wondering if this this has been fixed in any subsequent versions or not.
Hi Amir,
I seem to recall this issue previously and am wondering if it's an issue with the simple state machine library not firing on breakpoint change. Are there any JS errors present in developer tools? And are you able to see if the breakpoint code ever runs correctly on breakpoint change?
Matt
Hi Matt,
No console errors
I just noticed in the vendrcheckout.js that the initCommon() was called but but not the initSm() so I just added that as the fix.
Hi Amir,
The call to that method shouldn't really be done manually. The point of the simple state machine library is that it responds to breakpoints and runs the relevant function call when a breakpoint is crossed, so the
initSm
method should ONLY be run when in a small breakpoint, and then theinitLg
should be run when you move to/start in the larger breakpoint.Maybe upgrading the simple state machine library in the master layout file to a newer version might fix it. This it the library in question https://github.com/jonathan-fielding/SimpleStateManager there appears to be a bunch of newer versions.
Matt
That seem to do the trick.. I've upgraded to v4 and it's working fine now. Thanks
Excellent.
I'll raise an issue on the Vendr Checkout repo to say we need to upgrade it.
Glad you were able to get it working though
Matt
Hi Amir,
How did you go about upgrading the SimpleStateManager?
Thanks, Edi
Hey Edgar,
You should be able to update this line in the Vendr Checkout templates to point to the latest version https://github.com/vendrhub/vendr-checkout/blob/v2/dev/src/Vendr.Checkout/Web/UI/App_Plugins/VendrCheckout/views/VendrCheckoutMaster.cshtml#L213
Though I believe 4.1.1 is the latest (unless you are on an old version of Vendr Checkout)
Thanks Matt,
I actually just downloaded the latest version of SimpleStateManager (https://github.com/jonathan-fielding/SimpleStateManager/releases/tag/3.1.3) and integrated the ssm.min.js into the project and referenced it. Works for me.
Regards, Edi
Ok thanks. I'll give that a try.
is working on a reply...