ContextMenu doesn't work in popup page from firefox extension
I'm trying to use use ContextMenu in firefox extension popup page, however for following sample code, when I load it in extension popup page, clicking the button, the context menu doesn't show.
import React from 'react';
import ReactDOM from 'react-dom';
import { DefaultButton } from 'office-ui-fabric-react/lib/Button';
import { ContextualMenuItemType } from 'office-ui-fabric-react';
ReactDOM.render(<DefaultButton
text="Click for ContextualMenu"
menuProps={{
shouldFocusOnMount: true,
items: [
{
key: 'newItem',
text: 'New',
},
{
key: 'divider_1',
itemType: ContextualMenuItemType.Divider
},
],
}}
/>, document.getElementById('work'));
Hi @yajiex Can you please provide a Codepen repro? Here's one of ContextualMenu to get you started https://codepen.io/pen/?&editable=true. Also please fill out the Issue template in full, especially the environment information - what are the Fabric package & the browser & OS versions?
Spoke offline with @yajiex - We do support Firefox but not the plugins/extensions so resolving as external.
For those who may be interested, I got the reason. In popup page of Firefox extension, resize event is fired for no reason, which causes dismiss is called for contextMenu. A workaround would be stop the event propagation for resize event, but a more proper way would be to investigate why resize event is fired, I will investigate that later.