Skip to content
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3052ddd
Customisations
dpa99c Jan 23, 2018
7aa94d3
Bug fix: Webview below 20px under the toolbar on iOS 11.
dpa99c Feb 27, 2018
25756f5
Flag version as custom fork.
dpa99c Feb 27, 2018
a543f59
Add Android support for postMessage API
dpa99c Mar 9, 2018
5c05191
Add iOS support for postMessage API.
dpa99c Nov 6, 2018
e8dc67a
Add support for Cancel option in the list of menu items on Android (e…
dpa99c Jun 11, 2019
09ce277
Support custom accessibility descriptions for buttons on Android
dpa99c Jun 11, 2019
5dd23b8
Support custom accessibility descriptions for buttons on iOS
Jun 12, 2019
6778883
Fixes for iOS 13
Sep 26, 2019
67bd29f
Fix hide animation on iOS 13
Sep 26, 2019
fb47d80
Fix issue where, on building using Xcode 11 (iOS 13 SDK), after closi…
Oct 1, 2019
c20893d
[iOS] Fix full screen display on iPhone X-family. Add extra options: …
Oct 25, 2019
9fed66d
[Android] Add extra options: title.fontSize, toolbar.paddingX
dpa99c Oct 29, 2019
8f9daa3
[iOS] Fix webview height when fullscreen=false
Nov 8, 2019
24254ee
Add try/catch to prevent crashes when dismissing dialog
dpa99c Jan 6, 2020
106853b
Merge branch 'master' of github.com:dpa99c/cordova-plugin-themeablebr…
dpa99c Jan 6, 2020
fb5d21e
WIP: Rework ThemeableBrowser to use WKWebView (fullscreen not working)
Jun 8, 2020
c33da4a
Hack to make notched vs unnotched heights correct in portrait only (d…
Jun 16, 2020
b00803d
Add missing CDVThemeableBrowserUIDelegate
Jun 16, 2020
d3dfdd7
Fix height in landscape and when orientation changes
Jun 16, 2020
4f10b6d
Update/remove deprecations to enable compatibility with cordova-ios@6
Jun 18, 2020
318c645
Make lastReducedStatusBarHeight private so it doesn't conflict with C…
Jun 18, 2020
7bc2b18
Display document title as toolbar title if so configured
Jun 23, 2020
9438e7e
Add missing call to start spinner
dpa99c Jun 23, 2020
a1845f7
Remove remaining references to UIWebView
Jun 30, 2020
3dff818
(iOS) Fix vertical alignment of title when full screen
Sep 7, 2020
b74e0b5
Add Whitelist and WhitelistPlugin classes since the former has been r…
dpa99c Jul 6, 2021
523bce8
bugfix: Prevent nil url from being set on button event dictionary to …
Feb 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix hide animation on iOS 13
  • Loading branch information
Dave Alden committed Sep 26, 2019
commit 67bd29f22c7321e0d3a3740d203d4262eebf6a07
24 changes: 18 additions & 6 deletions src/ios/CDVThemeableBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ - (void)show:(CDVInvokedUrlCommand*)command withAnimation:(BOOL)animated
nav.orientationDelegate = self.themeableBrowserViewController;
nav.navigationBarHidden = YES;
if (@available(iOS 13.0, *)) {
nav.modalInPresentation = true;
nav.modalPresentationStyle = UIModalPresentationOverFullScreen;
}

Expand Down Expand Up @@ -624,6 +623,13 @@ - (void)webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
}
}

- (UIWindow*)getTmpWindow
{
// Set tmpWindow to hidden to make main webview responsive to touch again
// Based on https://stackoverflow.com/questions/4544489/how-to-remove-a-uiwindow
return self->tmpWindow;
}

- (void)browserExit
{
if (self.callbackId != nil) {
Expand Down Expand Up @@ -1234,19 +1240,25 @@ - (void)close
self.currentURL = nil;
self.webView.delegate = nil;

if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserExit)]) {
[self.navigationDelegate browserExit];
}
UIWindow* tmpWindow = [self.navigationDelegate getTmpWindow];

// Run later to avoid the "took a long time" log message.
dispatch_async(dispatch_get_main_queue(), ^{
if ([self respondsToSelector:@selector(presentingViewController)]) {
[[self presentingViewController] dismissViewControllerAnimated:!_browserOptions.disableAnimation completion:nil];
[[self presentingViewController] dismissViewControllerAnimated:!_browserOptions.disableAnimation completion:^{
tmpWindow.hidden = YES;
}];
} else {
[[self parentViewController] dismissViewControllerAnimated:!_browserOptions.disableAnimation completion:nil];
[[self parentViewController] dismissViewControllerAnimated:!_browserOptions.disableAnimation completion:^{
tmpWindow.hidden = YES;
}];
}
});

if ((self.navigationDelegate != nil) && [self.navigationDelegate respondsToSelector:@selector(browserExit)]) {
[self.navigationDelegate browserExit];
}

}

- (void)reload
Expand Down