Skip to content

Commit

Permalink
resolve issues with scroll on mobile Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Oct 23, 2023
1 parent 20ec050 commit e75e9bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions web/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ body {

overflow: hidden;
position: fixed;
left: 0;
right: 0;
bottom: 0;
inset: 0;
height: 100%;
touch-action: none;
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ document.addEventListener(
'touchmove',
(event: any) => {
event = event.originalEvent || event;
if (event.scale !== 1) {
if (typeof event.scale !== 'undefined' && event.scale !== 1) {
event.preventDefault();
}
},
Expand Down
6 changes: 4 additions & 2 deletions web/src/screens/Home.module.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.home {
margin: 15px;
margin-block-start: 15px;
padding: 15px;
padding-block-start: 0;
overflow: auto;
}

.disconnected {
margin: 15px;

div > div {
margin-top: 1rem;
margin-block-start: 1rem;
}

span {
Expand Down

0 comments on commit e75e9bf

Please sign in to comment.