Skip to content

Commit cafe539

Browse files
authored
Merge pull request #36 from OutSystems/fix/RMET-4500/dismiss-view-issue
fix: WebView close button error
2 parents a25254a + 471792e commit cafe539

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
9+
### Fixes
10+
11+
- Fixes an issue where dismissing an alert view triggered the onBrowserClosed event. [RMET-4500](https://outsystemsrd.atlassian.net/browse/RMET-4500).
12+
713
## 2.2.0
814

915
### Features

Sources/OSInAppBrowserLib/RouterAdapters/OSIABWebViewRouterAdapter.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,14 @@ private class OSIABWebViewController: UIHostingController<OSIABWebViewWrapperVie
121121
}
122122

123123
override func dismiss(animated flag: Bool, completion: (() -> Void)? = nil) {
124-
super.dismiss(animated: flag, completion: {
124+
guard presentedViewController == nil else {
125+
return super.dismiss(animated: flag, completion: completion)
126+
}
127+
128+
super.dismiss(animated: flag) {
125129
self.dismiss?()
126130
completion?()
127-
})
131+
}
128132
}
129133
}
130134

0 commit comments

Comments
 (0)