braintree / popup-bridge-android

PopupBridge allows WebViews to open popup windows in a browser and send data back to the WebView
MIT License
53 stars 27 forks source link

Popup Bridge does not work properly with Firefox with enabled "Tab Queue" setting #7

Closed ItsT-Mo closed 7 years ago

ItsT-Mo commented 7 years ago

General information

Issue description

When using Firefox as the default browser with Tab Queue enabled (under General Settings) popup bridge runs into an error.

When you have the feature enabled the onComplete function gets called with the payload as null.

Uncaught TypeError: Cannot read property 'queryItems' of null
    at Object.popupBridge.onComplete (85da3be9.app.js:6)
    at <anonymous>:1:20

When opening the link again, the error does not come up and the behaviour is as expected.

Using e.g. Chrome or even Firefox without the Tab Queue Setting leads to Popup Bridge working fine.

quinnjn commented 7 years ago

Thanks for the report! We're able to replicate it, and looking into it.

lkorth commented 7 years ago

Closing in favor of the PR fix in braintree/browser-switch-android#2

quinnjn commented 7 years ago

@ItsT-Mo At this time we don't have a good solution for detecting that the popup was backgrounded via Tab Queue.

When browser-switch-android switches to the browser it assumes that when it foregrounds again and there was no user interaction the browser switch was cancelled.

Unfortunately Tab Queue falls into the cancel case, and there doesn't seem to be any knowledge that it was backgrounded via Tab Queue.

ItsT-Mo commented 7 years ago

@quinnjn Alright, that makes sense. Thanks for the reply! :+1: Still love Popup Bridge :-)