From 6399c95268a833e98179bc1578d0f5454dbe67e2 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 15 Jan 2021 04:23:33 -0800 Subject: dialog polyfill: need to actually register on every element --- fatcat_scholar/templates/base.html | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fatcat_scholar/templates/base.html') diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 4e09de1..3d19004 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -405,7 +405,14 @@ if (!(typeof HTMLDialogElement === 'function')) { link.rel = "stylesheet" link.type = "text/css" link.href= "/static/dialog-polyfill.css"; + js.onload = function() { + var dialogs = document.querySelectorAll('dialog'); + for (i = 0; i < dialogs.length; i++) { + dialogPolyfill.registerDialog(dialogs[i]); + } + }; document.head.appendChild(link); + }; {% if settings.ENABLE_GOATCOUNTER -%} -- cgit v1.2.3