Here's a fun bug. We're currently building a Shopify store with fancy page transitions. All working well, except that when you enter the cart, and choose not to checkout, the cart seemingly empties itself on the next route change.
Haven't had time to investigate till today, but was pretty sure it had something to do with the fancy page transitions maybe causing cart data to either only be stored in the front end, or to be generating a new session accidentally when entering the cart.
Turns out the smoothness of the fancy page transitions is achieved to some degree by pre-loading all possible next routes by fetching all <a > tags in a page and storing the response. Cool, this is Shopify, page generation is "free" and the store is super speedy.

Except...
That on the cart page, there are links (which should be <button >s) that allow a user to remove a product from their cart

and our pre-loading script is fetching all these links, aaaand emptying our cart.

Ok, disable global pre-fetching, done, store is still slick.

Expect...
That occasionally products are still disappearing out of the cart, seemingly at random, isn't linked to stock level or product type.

Oh and it only happens on desktop. Annoying.
Turns out even with global pre-fetching disabled, our fancy page transitions still do a pre-fetch if a user moves their cursor over a link, hoping to predict where they might want to go next and pre-fetching that.
While manually testing, I would occasionally move my cursor over the "remove product" link without realising, triggering the pre-fetch and removing the product from my cart without actually clicking on anything.

Disabled that function, and now all sorted.
"Sooner or later, everything old is new again"
You can follow @invisiblea.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: