Closed Bug 1110502 Opened 10 years ago Closed 7 years ago

aboutAddons.js needs to clear add-on options dynamically inserted by add-on SDK

Categories

(Firefox for Android Graveyard :: Add-on Manager, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: anaran, Unassigned, Mentored)

References

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1106415 +++

With the cloned bug fixed, any add-on options added accumulate across all add-ons in about:addons.

The options nodes need to be cleared by aboutAddons.js the latest before one add-ons options list is built up again by injectOptions in native-options.js.
The single string preference option is shown three times
after closing and opening options of that particular add-on.

If another add-on's option were to be displayed its options would be added to the end of this cumulative list, running them all into one.
Thanks for filing, I can look into writing a patch.
Assignee: nobody → margaret.leibovic
Sorry it's taken me a while to look into this. I think this may be a bug with the add-on SDK... every time we show the detail view we clear the innerHTML of the options box:

http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/aboutAddons.js#326

Can you look into your logic to see if that might be injecting these extra elements by accident?
Flags: needinfo?(adrian.aichner)
Callback onAddonOptionsDisplayed in navite-options.js calls injectOptions each time it is notified.

I don't know why this causes no duplicated nodes in windows desktop.

  // allow the use of custom options.xul
  AddonManager.getAddonByID(id, (addon) => {
    on('addon-options-displayed', onAddonOptionsDisplayed, true);
    enabled.resolve({ id: id });
  });
Flags: needinfo?(adrian.aichner)
Assignee: margaret.leibovic → nobody
Mentor: margaret.leibovic
Whiteboard: [lang=js]
With Firefox 57, only WebExtensions are valid and the options pages are HTML.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: