# When clicking back have the search filter still applied

**URL:** https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014
**Category:** Attributes
**Created:** [June 9, 2023, 10:24pm UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014 "2023-06-09T22:24:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![stevenjhilario](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/stevenjhilario/32/81_2.png) [@stevenjhilario](https://forum.finsweet.com/u/stevenjhilario)
#### Post date: [June 9, 2023, 10:24pm UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014/1 "2023-06-09T22:24:46Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [June 9, 2023, 10:54pm UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014/2 "2023-06-09T22:54:22Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![stevenjhilario](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/stevenjhilario/32/81_2.png) [@stevenjhilario](https://forum.finsweet.com/u/stevenjhilario)
#### Post date: [June 11, 2023, 1:11am UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014/3 "2023-06-11T01:11:16Z")

</div>

this is the link [https://www.alphatheory.com/blog](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](https://preview.webflow.com/preview/alphatheory?utm_medium=preview_link&utm_source=designer&utm_content=alphatheory&preview=dc8e8ff117e82e3d669ad5bf27e796bb&pageId=639232c0a24d50cb86f6f280&workflow=preview)

---

<div class="post-metadata">

### Author: ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)
#### Post date: [June 12, 2023, 6:39pm UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014/4 "2023-06-12T18:39:30Z")

</div>

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

```auto
<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmsfilter',
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

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

```

---

<div class="post-metadata">

### Author: ![stevenjhilario](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/stevenjhilario/32/81_2.png) [@stevenjhilario](https://forum.finsweet.com/u/stevenjhilario)
#### Post date: [June 27, 2023, 1:18pm UTC](https://forum.finsweet.com/t/when-clicking-back-have-the-search-filter-still-applied/1014/5 "2023-06-27T13:18:49Z")

</div>

Thanks this works perfectly!
