From 1a79443fe82022e8cb29dc4ca10951454c3a1101 Mon Sep 17 00:00:00 2001 From: Moebius-Strip Date: Sun, 5 Aug 2018 14:20:36 -0400 Subject: [PATCH] Ugoira play/pause button hide fix Arrow functions don't allow the use of "this" (ends up returning the window object) so the buttons are failing to hide themselves. --- app/javascript/src/javascripts/ugoira.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/javascripts/ugoira.js b/app/javascript/src/javascripts/ugoira.js index 06ed66051..8c8a0af65 100644 --- a/app/javascript/src/javascripts/ugoira.js +++ b/app/javascript/src/javascripts/ugoira.js @@ -30,7 +30,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => { $("#ugoira-play").click(e => { Ugoira.player.play(); - $(this).hide(); + $("#ugoira-play").hide(); $("#ugoira-pause").show(); Ugoira.player_manually_paused = false; e.preventDefault(); @@ -38,7 +38,7 @@ Ugoira.create_player = (mime_type, frames, file_url) => { $("#ugoira-pause").click(e => { Ugoira.player.pause(); - $(this).hide(); + $("#ugoira-pause").hide(); $("#ugoira-play").show(); Ugoira.player_manually_paused = true; e.preventDefault();