Skip to content

Commit 5497962

Browse files
author
Goloman Adrian
committed
Backed out changeset bc504729e2b4 (bug 1935254) for causing node failures. CLOSED TREE
1 parent 2bdac9d commit 5497962

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

browser/components/aboutwelcome/content-src/components/SubmenuButton.jsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
33
* You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
import React, { useEffect, useRef, useCallback, useState } from "react";
5+
import React, { useEffect, useRef, useCallback } from "react";
66
import { Localized } from "./MSLocalized";
77

88
export const SubmenuButton = props => {
@@ -75,7 +75,6 @@ function addMenuitems(items, popup) {
7575

7676
const SubmenuButtonInner = ({ content, handleAction }) => {
7777
const ref = useRef(null);
78-
const [isSubmenuExpanded, setIsSubmenuExpanded] = useState(false);
7978
const isPrimary = content.submenu_button?.style === "primary";
8079
const onCommand = useCallback(
8180
event => {
@@ -122,13 +121,11 @@ const SubmenuButtonInner = ({ content, handleAction }) => {
122121
menupopup.addEventListener("popupshowing", event => {
123122
if (event.target === menupopup && event.target.anchorNode) {
124123
event.target.anchorNode.toggleAttribute("open", true);
125-
setIsSubmenuExpanded(true);
126124
}
127125
});
128126
menupopup.addEventListener("popuphiding", event => {
129127
if (event.target === menupopup && event.target.anchorNode) {
130128
event.target.anchorNode.toggleAttribute("open", false);
131-
setIsSubmenuExpanded(false);
132129
}
133130
});
134131
menupopup.listenersRegistered = true;
@@ -146,8 +143,6 @@ const SubmenuButtonInner = ({ content, handleAction }) => {
146143
value="submenu_button"
147144
onClick={onClick}
148145
ref={ref}
149-
aria-haspopup="menu"
150-
aria-expanded={isSubmenuExpanded}
151146
/>
152147
</Localized>
153148
);

browser/components/aboutwelcome/content/aboutwelcome.bundle.js

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ const StepsIndicator = props => {
495495
let steps = [];
496496
for (let i = 0; i < props.totalNumberOfScreens; i++) {
497497
let className = `${i === props.order ? "current" : ""} ${i < props.order ? "complete" : ""}`;
498-
steps.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
498+
steps.push(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
499499
key: i,
500500
className: `indicator ${className}`,
501501
role: "presentation"
@@ -832,7 +832,7 @@ const Localized = ({
832832
// Add zap style and content in a way that allows fluent to insert too.
833833
if (text.zap) {
834834
props.className += " welcomeZap";
835-
textNodes.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
835+
textNodes.push(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
836836
className: "short zap",
837837
"data-l10n-name": "zap",
838838
ref: zapRef
@@ -1211,7 +1211,7 @@ class ProtonScreen extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureCom
12111211
for (const item of content) {
12121212
switch (item.type) {
12131213
case "text":
1214-
elements.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_LinkParagraph__WEBPACK_IMPORTED_MODULE_9__.LinkParagraph, {
1214+
elements.push(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_LinkParagraph__WEBPACK_IMPORTED_MODULE_9__.LinkParagraph, {
12151215
text_content: item,
12161216
handleAction: this.props.handleAction
12171217
}));
@@ -1850,7 +1850,6 @@ const SubmenuButtonInner = ({
18501850
handleAction
18511851
}) => {
18521852
const ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
1853-
const [isSubmenuExpanded, setIsSubmenuExpanded] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false);
18541853
const isPrimary = content.submenu_button?.style === "primary";
18551854
const onCommand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(event => {
18561855
let {
@@ -1894,13 +1893,11 @@ const SubmenuButtonInner = ({
18941893
menupopup.addEventListener("popupshowing", event => {
18951894
if (event.target === menupopup && event.target.anchorNode) {
18961895
event.target.anchorNode.toggleAttribute("open", true);
1897-
setIsSubmenuExpanded(true);
18981896
}
18991897
});
19001898
menupopup.addEventListener("popuphiding", event => {
19011899
if (event.target === menupopup && event.target.anchorNode) {
19021900
event.target.anchorNode.toggleAttribute("open", false);
1903-
setIsSubmenuExpanded(false);
19041901
}
19051902
});
19061903
menupopup.listenersRegistered = true;
@@ -1917,9 +1914,7 @@ const SubmenuButtonInner = ({
19171914
className: `submenu-button ${isPrimary ? "primary" : "secondary"}`,
19181915
value: "submenu_button",
19191916
onClick: onClick,
1920-
ref: ref,
1921-
"aria-haspopup": "menu",
1922-
"aria-expanded": isSubmenuExpanded
1917+
ref: ref
19231918
}));
19241919
};
19251920

@@ -3159,7 +3154,7 @@ ReturnToAMO.defaultProps = _lib_aboutwelcome_utils_mjs__WEBPACK_IMPORTED_MODULE_
31593154
/******/
31603155
/************************************************************************/
31613156
var __webpack_exports__ = {};
3162-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
3157+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
31633158
(() => {
31643159
__webpack_require__.r(__webpack_exports__);
31653160
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
@@ -3295,7 +3290,7 @@ async function mount() {
32953290
messageId,
32963291
UTMTerm
32973292
} = await retrieveRenderContent();
3298-
react_dom__WEBPACK_IMPORTED_MODULE_1___default().render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(AboutWelcome, _extends({
3293+
react_dom__WEBPACK_IMPORTED_MODULE_1___default().render(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(AboutWelcome, _extends({
32993294
messageId: messageId,
33003295
UTMTerm: UTMTerm
33013296
}, aboutWelcomeProps)), document.getElementById("multi-stage-message-root"));

0 commit comments

Comments
 (0)