When clicking back have the search filter still applied

I’m using the search field and searching for a specific item, which works great. I then click on the item and go to the correct cms page, when I click back on the browser the text is still in the search field but the filter is not applied(this happens in Chrome). When I test this in Safari and click back the filter is applied. How can I have this behavior in Safari work the same in Chrome? I tested other sites using the Finsweet search filter and they also appear to have the same behavior.

Hey @stevenjhilario! This is a known issue for CMS Filter v1, Remember that CMS Filter v2 is in the works and it should be able to fix this issue. However if you can provide a link I might be able to come up with something to have it working :slight_smile:

this is the link https://www.alphatheory.com/blog and here is the read-only link: https://preview.webflow.com/preview/alphatheory?utm_medium=preview_link&utm_source=designer&utm_content=alphatheory&preview=dc8e8ff117e82e3d669ad5bf27e796bb&pageId=639232c0a24d50cb86f6f280&workflow=preview

Hey @stevenjhilario you can test this code, it simulates an input in the text field after CMS Filter has loaded. If there is some text in the field the list will filter

  window.fsAttributes = window.fsAttributes || [];
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

      const textInput = document.querySelector('.search_text-field');
      textInput.dispatchEvent(new Event('input', { bubbles: true }));

Thanks this works perfectly!

1 Like