user1422163
user1422163

Reputation: 135

How to to add a menu separator for a menuitem in firefox's context menu

I am trying to add a menu separator before and after my menuitem in firefox's contextmenu .
This is my expected output...

 |                     |
 |                     |
 |Select All           |
 |---------------------|
 |Show Meaning         |
 |---------------------|
 |                     |

My code...

<popup id="contentAreaContextMenu">
        <menuseparator />
        <menuitem id="diction-show-meaning" label="Show meaning" oncommand="" insertafter="context-selectall"/>
        <menuseparator />
    </popup>

However the menu separators are appearing at the END of the context menu!

How does one enclose a menuitem for contentAreaContextMenu? I don't prefer to do it dynamically through java script. But let me know if that's the only way possible...

Upvotes: 0

Views: 669

Answers (1)

muzuiget
muzuiget

Reputation: 1087

Try

<popup id="contentAreaContextMenu">
    <menuitem id="diction-show-meaning" label="Show meaning" oncommand="" insertafter="context-sep-selectall"/>
    <menuseparator />
</popup>

Upvotes: 1

Related Questions