From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- devtools/client/shared/components/menu/MenuButton.js | 9 ++++++--- devtools/client/shared/components/menu/MenuList.js | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'devtools/client/shared/components/menu') 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); -- cgit v1.2.3