GoogleChrome / dialog-polyfill

Polyfill for the HTML dialog element
BSD 3-Clause "New" or "Revised" License
2.45k stars 245 forks source link

DialogBox Action Button not working in Firefox #124

Closed prashant-93 closed 7 years ago

prashant-93 commented 7 years ago

My DialogBox is working fine with FireFox but the action button in the dialog box aren't working


(function() {
        var dialog = document.querySelector('#otpDialog');
        var showDialogButton = document.querySelector('#show-dialog');
       // var closeDialogButton = document.querySelector('.close');
        //alert("Dialogue is "+dialog);
        if (! dialog.showModal) {
          dialogPolyfill.registerDialog(dialog);
        }
        showDialogButton.addEventListener('click', function() {
          dialog.showModal();
        });

        dialog.querySelector('.close').addEventListener('click', function() {
          dialog.close();
        });
    }());