aboutsummaryrefslogtreecommitdiff
path: root/ui/static/js/touch_handler.js
diff options
context:
space:
mode:
authorGravatar Jacob Duba <jacob@mooshoe.me> 2022-01-27 21:39:35 -0600
committerGravatar GitHub <noreply@github.com> 2022-01-27 19:39:35 -0800
commit7a1429bcc14daaeb911db3675a830b05ec37a36e (patch)
treec44796442ece2339ff49f30b518978d8783083df /ui/static/js/touch_handler.js
parent21bbaf26918db00bed6f37176ac3ce77febc5dd1 (diff)
downloadv2-7a1429bcc14daaeb911db3675a830b05ec37a36e.tar.gz
v2-7a1429bcc14daaeb911db3675a830b05ec37a36e.tar.zst
v2-7a1429bcc14daaeb911db3675a830b05ec37a36e.zip
Fix regression: reset touch-item if not in /unread
Diffstat (limited to '')
-rw-r--r--ui/static/js/touch_handler.js7
1 files 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();