From 64855315e8ec66f8d9397838b62f1a4d15a66937 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Sat, 29 Jul 2023 20:06:23 +0530 Subject: [PATCH] fix: Fixed issue where links in Super would not open --- packages/mobile/ios/Podfile.lock | 16 ++++++++-------- .../MobileToolbarPlugin/MobileToolbarPlugin.tsx | 10 ++++++++-- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/packages/mobile/ios/Podfile.lock b/packages/mobile/ios/Podfile.lock index c9e0c77bd..98c9e2a32 100644 --- a/packages/mobile/ios/Podfile.lock +++ b/packages/mobile/ios/Podfile.lock @@ -380,7 +380,7 @@ PODS: - glog - react-native-fingerprint-scanner (5.0.0): - React-Core - - react-native-mmkv (2.7.0): + - react-native-mmkv (2.10.1): - MMKV (>= 1.2.13) - React-Core - react-native-version-info (1.1.1): @@ -503,13 +503,13 @@ PODS: - React-Core - RNFS (2.20.0): - React-Core - - RNIap (12.7.4): + - RNIap (12.10.5): - React-Core - RNKeychain (8.0.0): - React-Core - RNPrivacySnapshot (1.0.0): - React-Core - - RNShare (8.2.0): + - RNShare (8.2.2): - React-Core - SNReactNative (1.0.1): - React-Core @@ -723,7 +723,7 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: a7c83b31436843459a1961bfd74b96033dc77234 + boost: 57d2868c099736d80fcd648bf211b4431e51a558 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 FBLazyVector: 4cce221dd782d3ff7c4172167bba09d58af67ccb @@ -743,7 +743,7 @@ SPEC CHECKSUMS: MMKV: 9c4663aa7ca255d478ff10f2f5cb7d17c1651ccd MMKVCore: 89f5c8a66bba2dcd551779dea4d412eeec8ff5bb OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda + RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 RCTRequired: a2faf4bad4e438ca37b2040cb8f7799baa065c18 RCTTypeSafety: cb09f3e4747b6d18331a15eb05271de7441ca0b3 React: 13109005b5353095c052f26af37413340ccf7a5d @@ -759,7 +759,7 @@ SPEC CHECKSUMS: React-jsinspector: b511447170f561157547bc0bef3f169663860be7 React-logger: c5b527272d5f22eaa09bb3c3a690fee8f237ae95 react-native-fingerprint-scanner: be63e626b31fb951780a5fac5328b065a61a3d6e - react-native-mmkv: a2a40a0458bdbc9d43c4e7752ecfc5e3a87b66dd + react-native-mmkv: dea675cf9697ad35940f1687e98e133e1358ef9f react-native-version-info: a106f23009ac0db4ee00de39574eb546682579b9 react-native-webview: 9f111dfbcfc826084d6c507f569e5e03342ee1c1 React-NativeModulesApple: c57f3efe0df288a6532b726ad2d0322a9bf38472 @@ -782,10 +782,10 @@ SPEC CHECKSUMS: RNCAsyncStorage: 4b98ac3c64efa4e35c1197cb0c5ca5e9f5d4c666 RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592 RNFS: 4ac0f0ea233904cb798630b3c077808c06931688 - RNIap: 1a0b01a82ce45e61e72f8ef38f85922c5534510d + RNIap: c397f49db45af3b10dca64b2325f21bb8078ad21 RNKeychain: 4f63aada75ebafd26f4bc2c670199461eab85d94 RNPrivacySnapshot: 8eaf571478a353f2e5184f5c803164f22428b023 - RNShare: b089c33619bbfb0a32bc4069c858b9274e694187 + RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c SNReactNative: b5e9e529c175c13f3a618e27c76cf3071213d5e1 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 TrustKit: 073855e3adecd317417bda4ac9e9ac54a2e3b9f2 diff --git a/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx b/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx index 72c9ef583..b5164ca64 100644 --- a/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx +++ b/packages/web/src/javascripts/Components/SuperEditor/Plugins/MobileToolbarPlugin/MobileToolbarPlugin.tsx @@ -43,6 +43,7 @@ import { useApplication } from '@/Components/ApplicationProvider' import { GetRemoteImageBlock } from '../Blocks/RemoteImage' import { InsertRemoteImageDialog } from '../RemoteImagePlugin/RemoteImagePlugin' import LinkEditor from '../FloatingLinkEditorPlugin/LinkEditor' +import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/Constants/Constants' const MobileToolbarPlugin = () => { const application = useApplication() @@ -222,7 +223,8 @@ const MobileToolbarPlugin = () => { const elementToBeFocused = event.relatedTarget as Node const toolbarContainsElementToFocus = toolbarRef.current && toolbarRef.current.contains(elementToBeFocused) const linkEditorContainsElementToFocus = - linkEditorRef.current && linkEditorRef.current.contains(elementToBeFocused) + linkEditorRef.current && + (linkEditorRef.current.contains(elementToBeFocused) || elementToBeFocused === linkEditorRef.current) const willFocusBackspaceButton = backspaceButtonRef.current && elementToBeFocused === backspaceButtonRef.current if (toolbarContainsElementToFocus || linkEditorContainsElementToFocus || willFocusBackspaceButton) { return @@ -359,7 +361,11 @@ const MobileToolbarPlugin = () => { {modal}
{isSelectionLink && ( -
+