fix: Account for older desktop versions

This commit is contained in:
Tom Moor
2023-08-03 21:10:36 -04:00
parent fdd8ecc79d
commit 5b67273d8f

View File

@@ -72,8 +72,8 @@ export default function FindAndReplace({ readOnly }: Props) {
isModKey(ev) &&
!popover.visible &&
ev.code === "KeyF" &&
// Handler is through AppMenu on desktop app
!Desktop.isElectron(),
// Keyboard handler is through the AppMenu on Desktop v1.2.0+
!(Desktop.bridge && "onFindInPage" in Desktop.bridge),
(ev) => {
ev.preventDefault();
selectionRef.current = window.getSelection()?.toString();