Bug With Firefox - Disabled Attribute of Input Not Resetting When Refreshing

后端 未结 4 1855
一向
一向 2020-11-28 20:58

I\'ve found what I believe to be a bug with Firefox and I\'m wondering if this actually is a bug, as well as any workarounds for this.

If you create a basic webpage

4条回答
  •  执笔经年
    2020-11-28 21:03

    To deal with the back button, do this (from here)

        window.addEventListener('pageshow', PageShowHandler, false);
        window.addEventListener('unload', UnloadHandler, false);
    
        function PageShowHandler() {
            window.addEventListener('unload', UnloadHandler, false);
        }
    
        function UnloadHandler() {
            //enable button here
            window.removeEventListener('unload', UnloadHandler, false);
        }
    

提交回复
热议问题