From b3e02add3db86d26175a893332ab988c6cb6c7ad Mon Sep 17 00:00:00 2001 From: paweldomas Date: Fri, 8 Jul 2016 14:47:01 +0200 Subject: [PATCH] Fix moveToCorner method If the class was contained the old code was removing it --- modules/UI/recording/Recording.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/UI/recording/Recording.js b/modules/UI/recording/Recording.js index ecdb58355..6cdb5ccdd 100644 --- a/modules/UI/recording/Recording.js +++ b/modules/UI/recording/Recording.js @@ -201,10 +201,11 @@ function _showStopRecordingPrompt (recordingType) { */ function moveToCorner(selector, move) { let moveToCornerClass = "moveToCorner"; + let containsClass = selector.hasClass(moveToCornerClass); - if (move && !selector.hasClass(moveToCornerClass)) + if (move && !containsClass) selector.addClass(moveToCornerClass); - else + else if (!move && containsClass) selector.removeClass(moveToCornerClass); }