Skip to content

Commit 4fb0cec

Browse files
committed
disable iframe chrome when loading
1 parent 4d396b9 commit 4fb0cec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/routes/tutorial/[slug]/_/Chrome.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55
/** @type {string} */
66
export let path;
77
8+
/** @type {boolean} */
9+
export let loading;
10+
811
const dispatch = createEventDispatcher();
912
</script>
1013

1114
<div class="chrome">
12-
<button on:click={() => dispatch('refresh')} aria-label="reload">
15+
<button disabled={loading} on:click={() => dispatch('refresh')} aria-label="reload">
1316
<img src={refresh} alt="Reload icon" />
1417
</button>
1518

1619
<input
20+
disabled={loading}
1721
aria-label="URL"
1822
value={path}
1923
on:change={(e) => {

src/routes/tutorial/[slug]/index.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@
359359
<section class="preview" slot="b">
360360
<Chrome
361361
{path}
362+
{loading}
362363
on:refresh={() => {
363364
loading = true;
364365
set_iframe_src(adapter.base + path);

0 commit comments

Comments
 (0)