You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling the close() method while there is no capacitor browser window open, the console logs an error saying No active window to close! . When you open a deeplink from the capacitor browser itself, on some devices (particularly iOS) the browser does not close, as that link is already opened in the background (some url in the app page that actually started the capacitor browser). So we added that method on the deeplink open listener, but this then fires on every deeplink, not just that scenario, which causes the error (which does not affect the user or the code, just annoying in the logs).
Preferred Solution
It would be good if we had a method to check if the browser is open already. Eg if(Browser.isOpen()) Browser.close() which would stop the close method being called when not needed.
The text was updated successfully, but these errors were encountered:
This issue needs more information before it can be addressed.
In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
If no sample app is provided within 15 days, the issue will be closed.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.
Feature Request
Plugin
@capacitor/browser
Description
When calling the
close()
method while there is no capacitor browser window open, the console logs an error sayingNo active window to close!
. When you open a deeplink from the capacitor browser itself, on some devices (particularly iOS) the browser does not close, as that link is already opened in the background (some url in the app page that actually started the capacitor browser). So we added that method on the deeplink open listener, but this then fires on every deeplink, not just that scenario, which causes the error (which does not affect the user or the code, just annoying in the logs).Preferred Solution
It would be good if we had a method to check if the browser is open already. Eg
if(Browser.isOpen()) Browser.close()
which would stop theclose
method being called when not needed.The text was updated successfully, but these errors were encountered: