From 7a1429bcc14daaeb911db3675a830b05ec37a36e Mon Sep 17 00:00:00 2001 From: Jacob Duba Date: Thu, 27 Jan 2022 21:39:35 -0600 Subject: [PATCH] Fix regression: reset touch-item if not in /unread --- ui/static/js/touch_handler.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/static/js/touch_handler.js b/ui/static/js/touch_handler.js index 28330113..ac2f26d3 100644 --- a/ui/static/js/touch_handler.js +++ b/ui/static/js/touch_handler.js @@ -75,10 +75,13 @@ class TouchHandler { if (distance > 75) { toggleEntryStatus(this.touch.element); - } else { + } + + // If not on the unread page, undo transform of the dragged element. + if (document.URL.split("/").indexOf("unread") == -1 || distance <= 75) { this.touch.element.style.opacity = 1; this.touch.element.style.transform = "none"; - } + } } this.reset();