Skip to content

Commit

Permalink
fix(ios): set scroll bounce default to NO (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
pewsheen committed Mar 20, 2023
1 parent db6618b commit 4d61cf1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/ios-default-scroll-bounce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": "patch"
---

On iOS, set webview scroll bounce default to NO.
4 changes: 4 additions & 0 deletions src/webview/wkwebview/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ impl InnerWebView {
// set all autoresizingmasks
let () = msg_send![webview, setAutoresizingMask: 31];
let _: () = msg_send![webview, initWithFrame:frame configuration:config];

// disable scroll bounce by default
let scroll: id = msg_send![webview, scrollView];
let _: () = msg_send![scroll, setBounces: NO];
}

// allowsBackForwardNavigation
Expand Down

0 comments on commit 4d61cf1

Please sign in to comment.