Skip to content

Commit

Permalink
fix fixTma
Browse files Browse the repository at this point in the history
  • Loading branch information
kolirt committed Jul 30, 2024
1 parent 9eb0ac8 commit 73ec579
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/helpers/fixTma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function onScroll() {

export function fixTma(el: HTMLElement | null) {
if (VerticalSwipes.isSupported()) {
VerticalSwipes.enable()
VerticalSwipes.disable()
} else {
scrollableEl = el

Expand All @@ -48,7 +48,9 @@ export function fixTma(el: HTMLElement | null) {
}

export function unfixTma() {
if (!VerticalSwipes.isSupported()) {
if (VerticalSwipes.isSupported()) {
VerticalSwipes.enable()
} else {
window.removeEventListener('scroll', onScroll)
document.documentElement.removeEventListener('touchstart', onTouchStart)
document.documentElement.removeEventListener('touchmove', onTouchMove)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kolirt/vue-telegram-mini-app",
"version": "1.0.0",
"version": "1.0.1",
"type": "module",
"description": "Vue 3 telegram mini app package",
"author": "kolirt",
Expand Down

0 comments on commit 73ec579

Please sign in to comment.