Sort + Static + Form Select not working on Safari

I am using FS Static to add some static cards into a CMS collection list. I am then using FS sort to sort these in date order and FS Custom Form Select to ensure all the cards are sorted in date order on page load.

This solution is working perfectly on desktop Chrome, Arc, Opera but isn’t working on mobile browsers or desktop Safari.

I’ve used the FS Attribute Support tool and the setup appears to be faultless.

FS Attribute Support link: Feed
Webflow staging link: Feed

Any ideas? @evekayser @Support-Luis :crossed_fingers:t2:

Hey @hi11! Can we try using the static callback instead of the sort callback? Just replace cmssort with cmsstatic.

We can also try with a button trigger instead of a select trigger, this way we do not have to wait for the custom select script to load.

No change with that I’m afraid. I’ve also tried removing FS Select and testing by manually clicking the button and the Static + Sort combo doesn’t seem to work in Safari at all.

Hhmm, interesting. If we delete the static script, does this work?

If so we can try adding the script after CMS Sort is done :thinking:

Something like this

<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmssort',
    (listInstances) => {
      console.log('cmssort Successfully loaded!');

      (() => {
        const src = 'https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsstatic@1/cmsstatic.js';
        let e = document.querySelector(`script[src='src']`);
        if (!e) {
          e = document.createElement('script');
          e.async = true;
          e.src = src;
          document.head.append(e);
        }
      })();
    },
  ]);
</script>