Skip to content

Commit 502780c

Browse files
committedDec 23, 2022
Fix sidebar swipe flicker after letting go
1 parent 073a38e commit 502780c

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed
 

‎client/components/Sidebar.vue

+11-9
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
</template>
9191

9292
<script lang="ts">
93-
import {defineComponent, onMounted, onUnmounted, PropType, ref} from "vue";
93+
import {defineComponent, nextTick, onMounted, onUnmounted, PropType, ref} from "vue";
9494
import {useRoute} from "vue-router";
9595
import {useStore} from "../js/store";
9696
import NetworkList from "./NetworkList.vue";
@@ -199,18 +199,20 @@ export default defineComponent({
199199
200200
store.commit("sidebarDragging", false);
201201
202-
if (sidebar.value) {
203-
sidebar.value.style.transform = "";
204-
}
205-
206-
if (props.overlay) {
207-
props.overlay.style.opacity = "";
208-
}
209-
210202
touchStartPos.value = null;
211203
touchCurPos.value = null;
212204
touchStartTime.value = 0;
213205
menuIsMoving.value = false;
206+
207+
void nextTick(() => {
208+
if (sidebar.value) {
209+
sidebar.value.style.transform = "";
210+
}
211+
212+
if (props.overlay) {
213+
props.overlay.style.opacity = "";
214+
}
215+
});
214216
};
215217
216218
const onTouchStart = (e: TouchEvent) => {

0 commit comments

Comments
 (0)
Please sign in to comment.