From 7faed795300224da418e7f668c5336899feb1b64 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Sun, 5 Mar 2023 13:46:13 +0000 Subject: [PATCH] :arrow_up: upgrade react-modal to v3.16.1 and remove the patch (#718) --- packages/desktop-client/package.json | 1 - .../src/components/accounts/Filters.js | 26 +++---------------- packages/loot-design/package.json | 2 +- patches/react-modal+3.4.4.patch | 13 ---------- yarn.lock | 19 +++++++------- 5 files changed, 13 insertions(+), 48 deletions(-) delete mode 100644 patches/react-modal+3.4.4.patch diff --git a/packages/desktop-client/package.json b/packages/desktop-client/package.json index e3fe343c4d..2f2180cf6b 100644 --- a/packages/desktop-client/package.json +++ b/packages/desktop-client/package.json @@ -34,7 +34,6 @@ "react-app-rewired": "^2.2.1", "react-dnd": "^10.0.2", "react-dom": "16.13.1", - "react-modal": "3.4.4", "react-redux": "7.2.1", "react-router": "5.2.0", "react-router-dom": "5.2.0", diff --git a/packages/desktop-client/src/components/accounts/Filters.js b/packages/desktop-client/src/components/accounts/Filters.js index f0bf658591..5a75914e2a 100644 --- a/packages/desktop-client/src/components/accounts/Filters.js +++ b/packages/desktop-client/src/components/accounts/Filters.js @@ -1,12 +1,12 @@ import React, { useState, useRef, useEffect, useReducer } from 'react'; import { useSelector } from 'react-redux'; +import { FocusScope } from '@react-aria/focus'; import { parse as parseDate, format as formatDate, isValid as isDateValid, } from 'date-fns'; -import scopeTab from 'react-modal/lib/helpers/scopeTab'; import { send } from 'loot-core/src/platform/client/fetch'; import { getMonthYearFormat } from 'loot-core/src/shared/months'; @@ -89,26 +89,6 @@ function subfieldToOptions(field, subfield) { } } -function ScopeTab({ children }) { - let contentRef = useRef(); - - function onKeyDown(e) { - if (e.keyCode === 9) { - scopeTab(contentRef.current, e); - } - } - - useEffect(() => { - contentRef.current.focus(); - }, []); - - return ( -
- {children} -
- ); -} - function OpButton({ op, selected, style, onClick }) { return (