Skip to content

Fix bug with extensions popups opening content sources sheet

grant requested to merge fix/extension-popups-133 into develop

This MR resolves issue #133 (closed). I suspect that the cause of this bug was that since changing to a pure Android fragment for displaying the content sources, we were no longer consuming the popup session of the Ceno extensions. This meant that the browser's data store got stuck in a weird state where it still thought the Ceno extension was the active extension. This caused other calls to open an extension pop up to try opening the Ceno extension popup (which was now opening the bottom sheet).

The solution was straight-forward, just open the bottom sheet when the Ceno button is clicked instead of relying on WebExtensionPopupObserver to open the bottom sheet for us. This simplifies the implementation of the Ceno button, especially since implementing the native messaging between the browser and extension, we don't have any reason to trigger the extension's actions.

This MR also includes tests for validating that the bug is fixed, and will be useful as a regression test to prevent re-introducing this issue.

Merge request reports