From a69fb5eeaca96cc970503dfe88be50307bdbdfa8 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sun, 30 Apr 2023 00:56:59 +0000 Subject: [PATCH] I think this fixes posting. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4271 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 12 +++++------- core/style.css | 3 +-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/client.js b/core/client.js index e587124d..8fef6c73 100644 --- a/core/client.js +++ b/core/client.js @@ -644,7 +644,8 @@ function api_localStorageGet(key) { } function api_requestPermission(permission, id) { - let permissions = document.getElementById('permissions'); + let outer = document.createElement('div'); + outer.classList.add('permissions'); let container = document.createElement('div'); container.classList.add('permissions_contents'); @@ -688,17 +689,14 @@ function api_requestPermission(permission, id) { button.innerText = option.text; button.onclick = function() { resolve(option.grant[check.checked ? 1 : 0]); - while (permissions.firstChild) { - permissions.removeChild(permissions.firstChild); - } - permissions.style.visibility = 'hidden'; + document.body.removeChild(outer); } div.appendChild(button); } container.appendChild(div); + outer.appendChild(container); - permissions.appendChild(container); - permissions.style.visibility = 'visible'; + document.body.appendChild(outer); }); } diff --git a/core/style.css b/core/style.css index a7598f6f..23099de9 100644 --- a/core/style.css +++ b/core/style.css @@ -230,8 +230,7 @@ kbd { white-space: nowrap; } -#permissions { - visibility: hidden; +.permissions { position: absolute; display: block; top: 0;