-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev tools visibility fix #457
Conversation
@mallexxx, please, are you planning to review this PR? I can find someone else if you are busy |
@tomasstrba yes, doing it now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rolled back change was meant to remove inspector view from webView's parent view when switching Tabs, otherwise there were some weird effects of multiple inspector stacking when many tabs have inspector open.
Instead I suggest adding the following code to WebView.swift, it will fix the issue:
override func viewDidMoveToWindow() {
super.viewDidMoveToWindow()
if self.isInspectorShown {
self.openDeveloperTools()
}
}
@mallexxx got it! 👍 Thanks! Let me adjust the the solution |
Alex, thanks for the tip! 👍 This is ready for a re-review |
@@ -42,6 +42,12 @@ final class WebView: WKWebView { | |||
"WKMenuItemIdentifierDownloadLinkedFile": UserText.downloadLinkedFileAs, | |||
"WKMenuItemIdentifierSearchWeb": UserText.searchWithDuckDuckGo | |||
] | |||
|
|||
deinit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also reorganized WebView.swift and added few marks. Hope it is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (after fixing the // swiftlint:enable type_body_length linter issue)
Task/Issue URL: https://app.asana.com/0/1199178362774117/1201903875992992/f
Tech Design URL:
CC:
Description:
Fix of dev tools visibility after switching between tabs
Steps to test this PR:
Execute testing steps from #295
Testing checklist:
Internal references:
Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM