From 36ca31150048fbe86aea7038853d7c2826f00a62 Mon Sep 17 00:00:00 2001 From: Aaron George Date: Thu, 17 Oct 2019 06:29:53 +1100 Subject: [PATCH] FIXED: Media Elements Tutorial * FIXED: Seeking Seeking was being caused on the mousemove event, regardless of if the mouse was actually dragging or not --- .../tutorial/06-bindings/10-media-elements/app-a/App.svelte | 4 ++-- .../tutorial/06-bindings/10-media-elements/app-b/App.svelte | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte index 4b24316232..40276110f4 100644 --- a/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/10-media-elements/app-a/App.svelte @@ -14,7 +14,7 @@ showControlsTimeout = setTimeout(() => showControls = false, 2500); showControls = true; - if (e.which !== 1) return; // mouse not down + if (!(e.buttons & 1)) return; // mouse not down if (!duration) return; // video not loaded yet const { left, right } = this.getBoundingClientRect(); @@ -124,4 +124,4 @@ {format(duration)} - \ No newline at end of file + diff --git a/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte b/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte index 59e3dbe0c7..8712d6718b 100644 --- a/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/10-media-elements/app-b/App.svelte @@ -14,7 +14,7 @@ showControlsTimeout = setTimeout(() => showControls = false, 2500); showControls = true; - if (e.which !== 1) return; // mouse not down + if (!(e.buttons & 1)) return; // mouse not down if (!duration) return; // video not loaded yet const { left, right } = this.getBoundingClientRect();