mixitup icon indicating copy to clipboard operation
mixitup copied to clipboard

OnMixEnd Callback doesn't fire after several category selections on Firefox 73.0.1

Open jmenendezFKQ opened this issue 5 years ago • 5 comments

We have your library running on our website https://www.fkq.com/work

The category selections at the top should fire the onMixEnd callback when clicked every time it is clicked. This works appropriately in every other browser except Firefox. If you click any of the categories at the top of the page multiple times (approx 7-10) or random categories after several tries eventually it starts to fail with no error message.

Here is the code:

if ($('.mixcontainer').length) {

                var mixer = mixitup('.mixcontainer', {
                    selectors: {
                        control: '[data-mixitup-control]'
                    },
                    animation: {
                        duration: 50,
                        easing: 'ease-in-out',
                        reverseOut: true
                    },
                    callbacks: {
                        onMixEnd: function (state) {
                            // hasFailed true? show alert
                            if (state.hasFailed) {
                                $('#noItemsFoundMessage').addClass('show');
                            }
                            // hasFailed false? hide alert
                            else {
                                $('#noItemsFoundMessage').removeClass('show');
                            }

                            squareElement(".mix");
                            if (isMobile()) {
                                if ($(state.triggerElement).data('filter') == "all") {
                                    $('#loadMore').show();
                                    $(".mix:visible").slice(4, $(".mix:visible").length).hide();
                                } else {
                                    $('#loadMore').hide();
                                }
                            }
                            
                            myScroll.refresh();
                        }

                    }
                });
}

jmenendezFKQ avatar Feb 18 '20 16:02 jmenendezFKQ

Can anyone please assist me with this issue?

jmenendezFKQ avatar Mar 06 '20 16:03 jmenendezFKQ

Hi @jmenendezFKQ - sorry for the late reply.

I just tried to reproduce this via the link you attached but it seems that all JS on the page is broken so I can't actually filter anything. There are a few jQuery related errors in the console.

Please let me know when the page is working so I can try to reproduce the exact issue.

patrickkunka avatar Mar 11 '20 20:03 patrickkunka

@patrickkunka I am unable to fix the js error on the page as it is related to an older version of jquery validate that is required for an Umbraco control we use that cannot be changed or updated. This js error does not affect anything else and does not stop other jquery or scripts from running.

jmenendezFKQ avatar Jul 15 '20 12:07 jmenendezFKQ

Hi, I believe I'm also seeing this issue on Firefox. Sorry for bringing up an old issue - would you like me to attempt a JSBin with minimal project code to reproduce and test on Firefox and Chrome?

MadMikeyB avatar Jan 28 '21 00:01 MadMikeyB

MadMikeyB,

That would be awesome. Thank you :)

jmenendezFKQ avatar Feb 11 '21 19:02 jmenendezFKQ