Skip to content
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

Fix: windowType not checked in InAppBrowser show function macOS #1603

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dmeuwissen
Copy link

Connection with issue(s)

Resolve issue #1602

@dmeuwissen dmeuwissen changed the title Bugfix/issue 1602 Fix: windowType not checked in InAppBrowser show function macOS Mar 29, 2023
@pichillilorenzo
Copy link
Owner

pichillilorenzo commented May 16, 2023

That check isn't necessary, as it should always fall back to the CHILD window type.
I tested the TABBED window type, and it works as expected, so I don't understand what is the problem here.

@pichillilorenzo
Copy link
Owner

pichillilorenzo commented May 16, 2023

It seems that if you call the show() function too soon, for some reason, the NSApplication.shared.mainWindow?.tabbedWindows?.contains(self) or NSApplication.shared.mainWindow?.childWindows?.contains(self) will return false, so it will try to add again the Window causing the crash.

@dmeuwissen
Copy link
Author

I personally execute the show() function tied to a button, making it unlikely that I am invoking it early. In my current scenario, I maintain multiple tabs. If the configuration is set for tabbed windows, it should logically prevent the possibility of entering the logic for a child window opening. The suggested modification should effectively address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants