MenuButton will listen the HTMLTooltip hidden event even if HTMLTooltip is
destroyed. As a result of it, the timer which issued in the MenuButton's event
listener might fail due to the target window is destroyed. (e.g., switching the
dock mode to bottom from window mode.)
This patch will remove this event listener before destroying the HTMLTooltip.
Differential Revision: https://phabricator.services.mozilla.com/D3759
MenuButton will listen the HTMLTooltip hidden event even if HTMLTooltip is
destroyed. As a result of it, the timer which issued in the MenuButton's event
listener might fail due to the target window is destroyed. (e.g., switching the
dock mode to bottom from window mode.)
This patch will remove this event listener before destroying the HTMLTooltip.
Differential Revision: https://phabricator.services.mozilla.com/D3759
- Converts the reload condition <select> to use native context menu
- Converts the showMenu util to be reusable by both RDM and the Network Monitor
- Renames getToplevelWindow to getTopLevelWindow
- Renames the reload condition menu to be a setting menu in RDM according to the designs
- Uses the new photon setting icon in RDM
- Converts the reload condition <select> to use native context menu
- Converts the showMenu util to be reusable by both RDM and the Network Monitor
- Renames getToplevelWindow to getTopLevelWindow
- Renames the reload condition menu to be a setting menu in RDM according to the designs
- Uses the new photon setting icon in RDM
The menu button can't receive the key event on macOS since macOS doesn't leave the focus of the menu button even if click the menu button.
So this patch will add the focus to the button when clicking the button.
Differential Revision: https://phabricator.services.mozilla.com/D2585
Otherwise we will get errors like:
console.error: "Warning: React does not recognize the `menuId` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuid` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n in button (created by MenuButton)\n in MenuButton (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in ToolboxToolbar (created by ToolboxController)\n in ToolboxController"
console.error: "Warning: React does not recognize the `menuPosition` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuposition` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n in button (created by MenuButton)\n in MenuButton (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in ToolboxToolbar (created by ToolboxController)\n in ToolboxController"
console.error: "Warning: React does not recognize the `menuOffset` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `menuoffset` instead. If you accidentally passed it from a parent component, remove it from the DOM element.\n in button (created by MenuButton)\n in MenuButton (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in div (created by ToolboxToolbar)\n in ToolboxToolbar (created by ToolboxController)\n in ToolboxController"
It's also not what we intend to do.
Differential Revision: https://phabricator.services.mozilla.com/D2640
Currently we have a structure like the following:
<div role="menu" id="toolbox-meatball-menu">
<li class="menuitem">
<button
role="menuitemcheckbox"
aria-checked="true">
<span class="label">Dock to Bottom</span>
</button>
</li>
<li class="menuitem">
<button
role="menuitemcheckbox">
<span class="label">Dock to Right</span>
</button>
</li>
<hr></hr>
<li class="menuitem">
<button
class="command"
role="menuitem">
<span class="label">Documentation…</span>
</button>
</li>
</div>
As a result there is an <li> wrapper element between the role="menuitem" element
at the role="menu" element. By setting role="presentation" on the <li> wrapper
we can produce a more sensible accessibility tree.
Differential Revision: https://phabricator.services.mozilla.com/D2642
The widget will hide the XUL panel when clicking to the outside of panel
automatically.
If a user clicks the MenuButton when opening the popup, the popup will hide
automatically and mouse click event will be fired on macOS and Linux.
(Windows will eat this click event since the consumeoutsideclicks of this panel
is false.)
As a result of it, the popup menu will be reopened. In order to prevent this,
this patch will disable the MenuButton until popup is hidden by using
the popuphidden event. This popuphidden event will be fired before the click
event of MenuButton, then the click event of MenuButton will be fired after
popuphidden immediately.
MozReview-Commit-ID: 42xV0aWDmkR
This is to avoid rendering for a frame or two without the menu item icons being
visible which causes flicker, particularly on lower-end machines.
MozReview-Commit-ID: Aq7AOkPwu9V
This patch introduces the icon property for MenuItem. It also add padding to
allow for checkboxes only if there is at least one MenuItem using a checkbox.
MozReview-Commit-ID: CvvlR51mA53