Add-on UI fails when moving from toolbar to menu

Recently our add-on stopped working whenever a user drags it into the menu, using the new toolbar “customize” feature. Basically it prevents any click events in our overlay, and also prevents entering text into inputs. There is a single JS error logged on click events from BrowserUiTelemetry.jsm indicating that item.getAttribute() is not a function, which is frustrating since I can’t find a way to completely bypass browser telemetry. Just looking for anyone out there who’s had a similar issue.

Hi,

Do you make use of the new WebExtension API?

Cheers,
Larry P.

Well, I inherited the project, which was released in 2012. I’ve made some major bugfixes to try and get it up to speed. It is a bootstrapped extension, and I’m now seeing that there are many resources out there for migrating to WebExtension. I think at this point, it might be worth it just to avoid future complications, and for ease of development.

Need to find out what “item” is. Presumably the javascript expects it to be the button or menuitem, but it isn’t. Usually when this happens, the object is null or undefined. Hard to say more without seeing the code.