From 0d7ce72f0df6aa58800af0b19bae2186bd24079b Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Fri, 11 Feb 2022 19:05:05 +0400 Subject: [PATCH] Touch: fix media viewer slide --- src/components/appMediaViewerBase.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/appMediaViewerBase.ts b/src/components/appMediaViewerBase.ts index e35e8339..cf17ca5c 100644 --- a/src/components/appMediaViewerBase.ts +++ b/src/components/appMediaViewerBase.ts @@ -276,7 +276,9 @@ export default class AppMediaViewerBase< } }); - attachClickEvent(this.wholeDiv, this.onClick); + // ! cannot use the function because it'll cancel slide event on touch devices + // attachClickEvent(this.wholeDiv, this.onClick); + this.wholeDiv.addEventListener('click', this.onClick); this.listLoader.onJump = (item, older) => { if(older) this.onNextClick(item);