From f630cb16dbcfd066f63db939c9366a925e2e7746 Mon Sep 17 00:00:00 2001 From: Stuart Breckenridge Date: Mon, 8 Mar 2021 10:30:58 +0800 Subject: [PATCH] comments --- Mac/MainWindow/Detail/DetailWebView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mac/MainWindow/Detail/DetailWebView.swift b/Mac/MainWindow/Detail/DetailWebView.swift index 0b4c8e873..0dde85087 100644 --- a/Mac/MainWindow/Detail/DetailWebView.swift +++ b/Mac/MainWindow/Detail/DetailWebView.swift @@ -55,7 +55,7 @@ final class DetailWebView: WKWebView { evaluateJavaScript("document.body.style.overflow = 'visible';", completionHandler: nil) - /// On macOS 11, when a user exits full screen or zoomed mode (full screen with menu bar showing), the webview's origin.y is offset by a sizeable amount. This function adjusts the height of the window height by 1pt which puts the webview back in the correct place. This is an issue with SwiftUI and AppKit. + // On macOS 11, when a user exits full screen or exits zoomed mode (full screen with menu bar showing) by disconnecting an external display, the webview's origin.y is offset by a sizeable amount. This function adjusts the height of the window height by -1pt/+1pt which puts the webview back in the correct place. This is an issue with SwiftUI and AppKit. if #available(macOS 11, *) { guard var frame = window?.frame else { return