'one button function does not work on mobile but it works on pc correctly?

actually, it is a mini project about cart-shopping, clear button in cart section works correctly on pc and also works when I resize it to mobile screen on pc but when I open it on mobile(iOS, android) just this button does not work ! by the way, I work with local storage this is my project on GitHub : my source code:https://github.com/saba87/shopping_cart my site: https://saba87.github.io/shopping_cart/ my clear button function is :

clearButton(){
    clearButton.addEventListener('click',()=>{
        cartItems.replaceChildren();
        cart=[];
        const ui=new Ui();
        ui.setCartValue(cart);
        Storage.deleteCart();
        const addButtons=document.querySelectorAll('.add-to-cart');
         const addButtonsArray=[...addButtons];
         addButtonsArray.forEach((btn)=>{
                    btn.textContent='add to cart'
                    btn.disabled=false; 
     });
     backDrop.style.transform="translateY(-100vh)";
     const content=document.querySelector('.cart-container');
     content.style.display='none';
     
 });

}   


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source