Hello.
When i click on “See stock in another store” i cant click on the X to close the windows? Can anyone help me .. using Impact Theme
Link to website HERE
A user encountered an issue with the Impact Theme where the close button (X) on the ‘See stock in another store’ popup window was non-functional.
Solution Provided:
theme.liquid file</body> tagsetTimeout to ensure elements load before attempting to attach the eventOutcome:
The solution successfully resolved the issue, allowing the popup to close properly when clicking the X button.
Hello.
When i click on “See stock in another store” i cant click on the X to close the windows? Can anyone help me .. using Impact Theme
Link to website HERE
Hi @Dclootbox ,
Step 1: Go to Admin page → Select Themes → Select Edit code
Step 2: Find the theme.liquid file and add the code below near the end of the file, right before the closing tag
<script>
setTimeout(()=> {
if(window.location.href.includes("/products/")) {
console.log("aa")
const btnClose = document.querySelector("x-drawer").shadowRoot.querySelector("div:nth-child(4) > header > button > svg")
const modalELement = document.querySelector("x-drawer")
btnClose.addEventListener('click', () => {
modalELement.removeAttribute("open");
})
}
}, 800)
</script>
Result:
https://www.loom.com/share/9b2937502a3b46fe9f7962c3e8debf82?sid=88498e1c-24e1-46e5-a605-5fa7f91f4f7a
Hope it helps @Dclootbox
It works ! Thanks so much ![]()