Skip to content

Commit

Permalink
Fix document not scrolling in iOS (all browsers)
Browse files Browse the repository at this point in the history
This patches a bug where users cannot scroll a document on iOS,
because iOS does not allow iframes to be scrolled.

See https://davidwalsh.name/scroll-iframes-ios for details.
  • Loading branch information
ZenulAbidin committed Sep 21, 2022
1 parent 94767f0 commit e87f52f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/static/skins/colibris/src/layout.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
.scroll-wrapper {
display: flex;
min-width: 100vw;
}

@supports (-webkit-touch-callout: none) {
.scroll-wrapper {
-webkit-overflow-scrolling: touch;
overflow-y: scroll;
}

.scroll-wrapper iframe {}

}

#outerdocbody {
margin: 0 auto;
padding-top: 20px;
Expand Down
4 changes: 3 additions & 1 deletion src/templates/pad.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@

<% e.begin_block("afterEditbar"); %><% e.end_block(); %>

<div id="editorcontainerbox" class="flex-layout">
<div class="scroll-wrapper">
<div id="editorcontainerbox" class="flex-layout">
</div>

<% e.begin_block("editorContainerBox"); %>

Expand Down

0 comments on commit e87f52f

Please sign in to comment.