If push the ctrl+t, browser will open the new tab. In this case,
the XUL popup panel doesn't hide automatically(autohide=false).
As the result of it, the popup menu will be displayed in the new tab
content. So this patch will hide the popup when receiving the ctr+t
shortcut in the MenuButton.
Differential Revision: https://phabricator.services.mozilla.com/D8809
Tapping the menu button during the panel has shown make the menu button to be unopenable. This cause reason is removing the pointer-events property before the mouse event happens.
The tapping event will happen many the event like the following:
1) touchstart
2) touchmove (Long tap only)
3) touchend
4) mousedown
5) mouseup
6) click
This patch will detect the touchend event to eat the click event.
Differential Revision: https://phabricator.services.mozilla.com/D7827
This patch will remove setContest(), and change the following things instead of this:
* Use HTMLTooltip.panel.appendChild() instead of HTMLTooltip.setContent().
* Add HTMLTooltip.setContetnSize() to specify the panel size if need this.
Differential Revision: https://phabricator.services.mozilla.com/D7044
This patch will:
- Call the children as function when rendering if MenuButton's children property is the function.
- Add the callback which is called when the focused item changed.
Differential Revision: https://phabricator.services.mozilla.com/D6352
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
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
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