Skip to content

Commit

Permalink
removed unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jadutter committed Oct 12, 2023
1 parent f845289 commit e228aa9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/components/modal/content/US/parts/Content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ const Content = ({ headerRef, contentWrapper }) => {
<div>Subject to credit approval.</div>
<hr className="divider" />
</div>
<main className="main" aria-label={`More info on the Pay Later offer${tabs.length > 1 ? 's' : ''}.`}>
{tabsContent}
</main>
<main className="main">{tabsContent}</main>
</div>
);
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/modal/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ export function setupTabTrap() {
const tabArray = arrayFrom(document.querySelectorAll(focusableElementsString)).filter(
node => window.getComputedStyle(node).visibility === 'visible'
);

// SHIFT + TAB
if (e.shiftKey && document.activeElement === tabArray[0]) {
e.preventDefault();
tabArray[tabArray.length - 1].focus();
} else if (document.activeElement === tabArray[tabArray.length - 1]) {
} else if (!e.shiftKey && document.activeElement === tabArray[tabArray.length - 1]) {
e.preventDefault();
tabArray[0].focus();
}
Expand Down
1 change: 0 additions & 1 deletion src/components/modal/v2/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ export function setupTabTrap() {
const tabArray = arrayFrom(document.querySelectorAll(focusableElementsString)).filter(
node => window.getComputedStyle(node).visibility === 'visible'
);

// SHIFT + TAB
if (e.shiftKey && document.activeElement === tabArray[0]) {
e.preventDefault();
Expand Down

0 comments on commit e228aa9

Please sign in to comment.