diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/shared/components/menu | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/shared/components/menu')
-rw-r--r-- | devtools/client/shared/components/menu/MenuButton.js | 9 | ||||
-rw-r--r-- | devtools/client/shared/components/menu/MenuList.js | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/devtools/client/shared/components/menu/MenuButton.js b/devtools/client/shared/components/menu/MenuButton.js index 3367987c3c..4a3b1e5c48 100644 --- a/devtools/client/shared/components/menu/MenuButton.js +++ b/devtools/client/shared/components/menu/MenuButton.js @@ -427,9 +427,12 @@ class MenuButton extends PureComponent { buttonProps.className = buttonProps.className ? `${buttonProps.className} ${iconClass}` : iconClass; - buttonProps.style = { - "--menuitem-icon-image": "url(" + this.props.icon + ")", - }; + // `icon` may be a boolean and the icon URL will be set in CSS. + if (typeof this.props.icon == "string") { + buttonProps.style = { + "--menuitem-icon-image": "url(" + this.props.icon + ")", + }; + } } if (this.state.isMenuInitialized) { diff --git a/devtools/client/shared/components/menu/MenuList.js b/devtools/client/shared/components/menu/MenuList.js index 4c355cca10..dafcc407bc 100644 --- a/devtools/client/shared/components/menu/MenuList.js +++ b/devtools/client/shared/components/menu/MenuList.js @@ -55,7 +55,7 @@ class MenuList extends PureComponent { this.notifyHighlightedChildChange(e.target.id); } - onMouseOutOrBlur(e) { + onMouseOutOrBlur() { const hoveredElem = this.wrapperRef.querySelector(":hover"); if (!hoveredElem) { this.notifyHighlightedChildChange(null); |