Skip to content

Commit 8d7845a

Browse files
authored
Reinstate verification of main navigation in case of navigationType other (#1023)
1 parent f7703ec commit 8d7845a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ - (CDVIntentAndNavigationFilterValue) filterUrl:(NSURL*)url
108108

109109
+ (BOOL)shouldOpenURLRequest:(NSURLRequest*)request navigationType:(CDVWebViewNavigationType)navigationType
110110
{
111+
BOOL isMainNavigation = [[request.mainDocumentURL absoluteString] isEqualToString:[request.URL absoluteString]];
112+
111113
return (
112114
navigationType == CDVWebViewNavigationTypeLinkClicked ||
113-
navigationType == CDVWebViewNavigationTypeLinkOther
115+
(navigationType == CDVWebViewNavigationTypeLinkOther && isMainNavigation)
114116
);
115117
}
116118

0 commit comments

Comments
 (0)