Maximum call stack size exceeded error

后端 未结 30 2547
独厮守ぢ
独厮守ぢ 2020-11-21 23:51

I am using a Direct Web Remoting (DWR) JavaScript library file and am getting an error only in Safari (desktop and iPad)

It says

Maximum call

30条回答
  •  感情败类
    2020-11-22 00:30

    In my case, click event was propagating on child element. So, I had to put the following:

    e.stopPropagation()

    on click event:

     $(document).on("click", ".remove-discount-button", function (e) {
               e.stopPropagation();
               //some code
            });
     $(document).on("click", ".current-code", function () {
         $('.remove-discount-button').trigger("click");
     });
    

    Here is the html code:

     

提交回复
热议问题