Closed Bug 1589459 Opened 5 years ago Closed 4 years ago

No edit context menu appears in Search field of Addons Manager -> Extensions

Categories

(Thunderbird :: Add-Ons: General, defect)

defect
Not set
normal

Tracking

(thunderbird_esr60 unaffected, thunderbird_esr68 affected, thunderbird68 wontfix, thunderbird69 wontfix, thunderbird70 wontfix, thunderbird71 affected)

RESOLVED FIXED
Thunderbird 75.0
Tracking Status
thunderbird_esr60 --- unaffected
thunderbird_esr68 --- affected
thunderbird68 --- wontfix
thunderbird69 --- wontfix
thunderbird70 --- wontfix
thunderbird71 --- affected

People

(Reporter: alice0775, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(1 file, 3 obsolete files)

Steps To Reproduce:

  1. Open Add-ons Manager
  2. Select "Extensions" of left pane
  3. Right click on search field on top of the right pane

Actual Results:
Nothing happens

Expected Results:
Edit context menu should appear

Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=0578849d7c953f13f6b8c6c57c1054b5a445c317&tochange=55a635377bed6cdeb57175d7e25a67b34dfce540
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a42caa9f04fc41044437ac56eab6f6086c841d9f&tochange=2abcefb31ba7b2a1c573edc5695b772826c6a078

Regressed by: 55a635377bed6cdeb57175d7e25a67b34dfce540 Magnus Melin — Bug 1534913 - Port bug 1521280 [Remove search-textbox binding] to Thunderbird. r=jorgk

Grrrr, yet another one. We've already added the damn scripts for the filter manager, config editor, password manager and downloads manager in bug 1584720.

But that add-ons manager is an M-C piece, right?

Flags: needinfo?(mkmelin+mozilla)
Flags: needinfo?(geoff)

It is but it's probably related to the other context menu problems we are having in about: pages. Alessandro's working on that.

Flags: needinfo?(geoff) → needinfo?(alessandro)

I'm not sure why Firefox doesn't show this problem, since they do not include the needed js files (in extensions.xul). Anyway, I guess we could add the script elements in aboutAddonsExtra.js somewhere? And while at it, remove the "on" - https://searchfox.org/comm-central/rev/dbc116c2b1bcb8d1c50af5d45b750af2a174a9e3/mail/base/content/aboutAddonsExtra.js#61

Flags: needinfo?(mkmelin+mozilla)

It's because they use the HTML Add-ons manager.

So which resource would you like to dedicate to this, Magnus?

(In reply to Richard Marti (:Paenglab) from comment #4)

It's because they use the HTML Add-ons manager.

I don't think so? Where is that?

Looking into this a bit, turns out it's not directly fixable outside of adding the needed js includes to extensions.xul. (CSP on the page won't allow us to make use of the scripts properly)

I wasn't able to fix the about:config issue in bug 1584795 as a patch in m-c was needed.

Flags: needinfo?(alessandro)

Maybe not be worth doing anything about for 68, and things could be a lot different before we get to 78.

Summary: No edit context menu appears in Search field of Addons Manager -> Extentions → No edit context menu appears in Search field of Addons Manager -> Extensions

At least for trunk, turns out this due to bug 1472785.
We should just turn on the context menu.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #9126716 - Flags: review?(geoff)
Comment on attachment 9126716 [details] [diff] [review]
bug1589459_addons_input_context.patch

Review of attachment 9126716 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/base/content/aboutAddonsExtra.js
@@ +26,5 @@
>      document.insertBefore(contentStylesheet, document.documentElement);
>  
>      // Fix the "Search on addons.mozilla.org" placeholder text in the searchbox.
>      let browser = document.getElementById("html-view-browser");
> +    browser.contentWindow.addEventListener("DOMContentLoaded", () => {

This doesn't work (for me). Probably DOMContentLoaded has already happened.
Attachment #9126716 - Flags: review?(geoff)
Attachment #9126716 - Attachment is obsolete: true
Attachment #9127565 - Flags: review?(geoff)
Attachment #9127565 - Attachment is obsolete: true
Attachment #9127565 - Flags: review?(geoff)
Attachment #9127566 - Flags: review?(geoff)
Attachment #9127566 - Attachment is obsolete: true
Attachment #9127566 - Flags: review?(geoff)
Attachment #9127568 - Flags: review?(geoff)
Comment on attachment 9127568 [details] [diff] [review]
bug1589459_addons_input_context.patch

Well it works but it's seriously ugly IMO. This is what I'd do, use whichever one makes you happy:
```
if (!/(interactive|complete)/.test(browser.contentDocument.readyState)) {
  await new Promise(resolve =>
    browser.contentWindow.addEventListener("DOMContentLoaded", resolve, {
      once: true,
    })
  );
}
```
Attachment #9127568 - Flags: review?(geoff) → review+

Yes that's nicer.

OS: Windows 10 → All
Hardware: Desktop → All
Target Milestone: --- → Thunderbird 75.0

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/5df68d3ea93c
allow context menu for Thunderbird's about:addons. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: