This is an automated email from the ASF dual-hosted git repository.

manuelbeck pushed a commit to branch pr-ios-full-width-webview-landscape
in repository 
https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git

commit 4ef2db437bc83178bb8c128cc67958726f53c3f1
Author: Manuel Beck <[email protected]>
AuthorDate: Fri Feb 20 12:52:56 2026 +0100

    fix(ios): full width WebView on landscape
    
    - The width of the WebView was contrained to the safe area, which is not 
correct, since the safe area is handled by the website itself. When not setting 
it to full width, transparent areas will appear left and right of the WebView 
on landscape. The width is now edge to edge on landscape and the website can 
handle itself the safe area.
    - Added comments `Left` and `Right` for the horizontal constraints
---
 src/ios/CDVWKInAppBrowser.m | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/ios/CDVWKInAppBrowser.m b/src/ios/CDVWKInAppBrowser.m
index d487cc3..7fd8b47 100644
--- a/src/ios/CDVWKInAppBrowser.m
+++ b/src/ios/CDVWKInAppBrowser.m
@@ -849,19 +849,25 @@ BOOL isExiting = NO;
     // Setup horizontal constraints
     // WebView horizontal constraints
     [NSLayoutConstraint activateConstraints:@[
-        [self.webView.leadingAnchor 
constraintEqualToAnchor:self.view.safeAreaLayoutGuide.leadingAnchor],
-        [self.webView.trailingAnchor 
constraintEqualToAnchor:self.view.safeAreaLayoutGuide.trailingAnchor]
+        // Left
+        [self.webView.leadingAnchor 
constraintEqualToAnchor:self.view.leadingAnchor],
+        // Right
+        [self.webView.trailingAnchor 
constraintEqualToAnchor:self.view.trailingAnchor]
     ]];
 
     // Toolbar horizontal constraints
     [NSLayoutConstraint activateConstraints:@[
+        // Left
         [self.toolbar.leadingAnchor 
constraintEqualToAnchor:self.view.leadingAnchor],
+        // Right
         [self.toolbar.trailingAnchor 
constraintEqualToAnchor:self.view.trailingAnchor]
     ]];
 
     // Address label horizontal constraints
     [NSLayoutConstraint activateConstraints:@[
+        // Left
         [self.addressLabel.leadingAnchor 
constraintEqualToAnchor:self.view.leadingAnchor constant:5.0],
+        // Right
         [self.addressLabel.trailingAnchor 
constraintEqualToAnchor:self.view.trailingAnchor constant:-5.0]
     ]];
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to