Can't select text displayed in the sidebar

I’m running Firefox Developer Edition 96.0b9 (64-bit) on macOS Monterey 12.1.

My extension is called Context Search. It’s available on Github here and on AMO here.

When I configure the extension in its options page to open search results in the sidebar, search results are correctly displayed in the sidebar but I’m unable to select the text of the search results.

When I open search results in a new tab and then use the extension Side View to open the tab’s contents in the sidebar, then I can select the text.

I am not able to find what’s wrong with my extension!

Thank you in advance for your help.

I think text selection might be disabled by the browser style (see Browser styles on MDN). By default, sidebars also use the browser’s stylesheets for extensions which, among other things, disables text selection.

You can opt-out of this by specifying browser_style: false in your extension’s manifest.json like so:

    "manifest_version": 2,
    "name": "Context Search",

    "sidebar_action": {
        "browser_style": false,

(See sidebar_action on MDN)

Megan, you are absolutely fabulous! Can’t thank you enough!

My best wishes for the new year!

1 Like