mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
fix bug where viewerAction is overridden on webreader
This commit is contained in:
parent
6721a0681c
commit
aa79137223
1 changed files with 3 additions and 3 deletions
|
|
@ -49,6 +49,9 @@ struct WebReader: PlatformViewRepresentable {
|
|||
let contentController = WKUserContentController()
|
||||
|
||||
webView.navigationDelegate = context.coordinator
|
||||
webView.configuration.userContentController = contentController
|
||||
webView.configuration.userContentController.removeAllScriptMessageHandlers()
|
||||
|
||||
#if os(iOS)
|
||||
webView.isOpaque = false
|
||||
webView.backgroundColor = .clear
|
||||
|
|
@ -60,9 +63,6 @@ struct WebReader: PlatformViewRepresentable {
|
|||
#else
|
||||
webView.setValue(false, forKey: "drawsBackground")
|
||||
#endif
|
||||
webView.configuration.userContentController = contentController
|
||||
|
||||
webView.configuration.userContentController.removeAllScriptMessageHandlers()
|
||||
|
||||
for action in WebViewAction.allCases {
|
||||
webView.configuration.userContentController.add(context.coordinator, name: action.rawValue)
|
||||
|
|
|
|||
Loading…
Reference in a new issue