Skip to content

Commit 2301fdd

Browse files
Fix document not scrolling in iOS (all browsers) (#5599)
* Fix document not scrolling in iOS (all browsers) 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. * trigger GitHub actions --------- Co-authored-by: John McLear <[email protected]>
1 parent 426174d commit 2301fdd

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/static/skins/colibris/src/layout.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
.scroll-wrapper {
2+
display: flex;
3+
min-width: 100vw;
4+
}
5+
6+
@supports (-webkit-touch-callout: none) {
7+
.scroll-wrapper {
8+
-webkit-overflow-scrolling: touch;
9+
overflow-y: scroll;
10+
}
11+
12+
.scroll-wrapper iframe {}
13+
14+
}
15+
116
#outerdocbody {
217
margin: 0 auto;
318
padding-top: 20px;

src/templates/pad.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080

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

83-
<div id="editorcontainerbox" class="flex-layout">
83+
<div class="scroll-wrapper">
84+
<div id="editorcontainerbox" class="flex-layout">
85+
</div>
8486

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

0 commit comments

Comments
 (0)