开发者

How to remove drop down menu indicator on a button in a XUL Firefox extension?

开发者 https://www.devze.com 2022-12-16 15:57 出处:网络
I\'m working on a Firefox extension that creates a toolbar in the browser.I\'m using awith type=\"menu\" t开发者_开发技巧o create a menu that pops up when the button is clicked.

I'm working on a Firefox extension that creates a toolbar in the browser. I'm using a with type="menu" t开发者_开发技巧o create a menu that pops up when the button is clicked.

By default, setting type="menu" creates a little menu indicator triangle, like in this image:

How to remove drop down menu indicator on a button in a XUL Firefox extension?

Is there any way, either in XUL or in the CSS, to get rid of this indicator triangle?


You could try with another approach. Insert a regular button and use the popup property to make a menupopup appear when clicking on it.

<popupset>
    <menupopup position="after_start" id="testPopup">
        <menuitem label="test"/>
    </menupopup>
</popupset>
<button label="test" type="menu" popup="testPopup"/>

You can play around with the position property to get the desired result

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号