diff --git a/public/css/editor.css b/public/css/editor.css
index a9e8fed..cc16491 100644
--- a/public/css/editor.css
+++ b/public/css/editor.css
@@ -176,7 +176,7 @@
padding: .5rem;
}
-.editor-button-icon {
+.editor-button img {
display: block;
height: 1.65rem;
width: 1.65rem;
diff --git a/public/index.html b/public/index.html
index b6b7769..7efda82 100644
--- a/public/index.html
+++ b/public/index.html
@@ -141,7 +141,7 @@
diff --git a/public/js/bootstrap-loader.js b/public/js/bootstrap-loader.js
index 405a1e7..f812a80 100644
--- a/public/js/bootstrap-loader.js
+++ b/public/js/bootstrap-loader.js
@@ -27,6 +27,14 @@
const versioned = path => `${path}${path.includes('?') ? '&' : '?'}v=${encodeURIComponent(versions.app)}`;
+ function schedule(callback, delay = 0) {
+ if (typeof globalThis.setTimeout === 'function') {
+ return globalThis.setTimeout(callback, delay);
+ }
+ callback();
+ return null;
+ }
+
function setStatusText(text, immediate = false) {
if (!statusText) return;
statusTransition += 1;
@@ -37,7 +45,7 @@
return;
}
statusText.classList.add('is-fading');
- globalThis.setTimeout(() => {
+ schedule(() => {
if (transition !== statusTransition) return;
statusText.textContent = text;
statusText.classList.remove('is-fading');
@@ -139,9 +147,9 @@
if (typeof globalThis.requestAnimationFrame === 'function') {
globalThis.requestAnimationFrame(showEnter);
} else {
- globalThis.setTimeout(showEnter, 0);
+ schedule(showEnter);
}
- globalThis.setTimeout(() => {
+ schedule(() => {
if (actionStatus) actionStatus.hidden = true;
}, 220);
enter.focus();
diff --git a/test/bootstrap-start-ui.test.js b/test/bootstrap-start-ui.test.js
index e485857..4808f3c 100644
--- a/test/bootstrap-start-ui.test.js
+++ b/test/bootstrap-start-ui.test.js
@@ -41,6 +41,8 @@ test('bootstrap status text fades between loading steps and is replaced by the s
assert.match(loader, /actionStatus\?\.classList\.add\('is-leaving'\)/);
assert.match(loader, /enter\.classList\.add\('is-visible'\)/);
assert.match(loader, /const completedSteps = new Set\(\)/);
+ assert.match(loader, /function schedule\(callback, delay = 0\)/);
+ assert.match(loader, /typeof globalThis\.setTimeout === 'function'/);
assert.doesNotMatch(loader, /dataset\.state/);
assert.match(loader, /event\.stopPropagation\?\.\(\)/);
});
diff --git a/test/editor-ui.test.js b/test/editor-ui.test.js
index 9d01b26..b241266 100644
--- a/test/editor-ui.test.js
+++ b/test/editor-ui.test.js
@@ -20,7 +20,8 @@ test('editor markup and source describe local draft creation instead of immediat
const ui = await read('public/js/editor-ui.js');
assert.match(html, /id="editor-button"[^>]+aria-label="Streckenverwaltung öffnen"/);
- assert.match(html, /class="editor-button-icon"[^>]+src="images\/icons\/route-management\.svg"[^>]+alt=""/);
+ assert.match(html, /
]+src="images\/icons\/route-management\.svg"[^>]+alt=""[^>]*>/);
+ assert.doesNotMatch(html, /class="editor-button-icon"/);
assert.match(html, /