Merge pull request #2135 from bdougsand/ipad-scrolling
Tweaks the scroll behavior when space bar is pressed
This commit is contained in:
commit
df9a73716b
@ -128,8 +128,9 @@ class WebViewController: UIViewController {
|
||||
func scrollPageDown() {
|
||||
guard let webView = webView else { return }
|
||||
|
||||
let overlap = 2 * UIFont.systemFont(ofSize: UIFont.systemFontSize).lineHeight * UIScreen.main.scale
|
||||
let scrollToY: CGFloat = {
|
||||
let fullScroll = webView.scrollView.contentOffset.y + webView.scrollView.layoutMarginsGuide.layoutFrame.height
|
||||
let fullScroll = webView.scrollView.contentOffset.y + webView.scrollView.layoutMarginsGuide.layoutFrame.height - overlap
|
||||
let final = finalScrollPosition()
|
||||
return fullScroll < final ? fullScroll : final
|
||||
}()
|
||||
|
Loading…
x
Reference in New Issue
Block a user