fix dialog shortcut issue

possibly fixes #1919
pull/1925/head
Mikael Finstad 2 years ago
parent 762072a347
commit 96baa9a931
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -2148,9 +2148,15 @@ function App() {
toggleKeyboardShortcuts,
toggleSettings,
openSendReportDialog: () => { openSendReportDialogWithState(); },
detectBlackScenes,
detectSilentScenes,
detectSceneChanges,
detectBlackScenes: ({ keyup }) => {
if (keyup) detectBlackScenes();
},
detectSilentScenes: ({ keyup }) => {
if (keyup) detectSilentScenes();
},
detectSceneChanges: ({ keyup }) => {
if (keyup) detectSceneChanges();
},
createSegmentsFromKeyframes,
toggleWaveformMode,
toggleShowThumbnails,

@ -4,7 +4,9 @@ import { useEffect, useRef } from 'react';
// Also document.addEventListener needs custom handling of modifier keys or C will be triggered by CTRL+C, etc
import Mousetrap from 'mousetrap';
const keyupActions = new Set(['seekBackwards', 'seekForwards']);
// for all dialog actions (e.g. detectSceneChanges) we must use keyup, or we risk having the button press inserted into the dialog's input element right after the dialog opens
// todo use keyup for most events?
const keyupActions = new Set(['seekBackwards', 'seekForwards', 'detectBlackScenes', 'detectSilentScenes', 'detectSceneChanges']);
export default ({ keyBindings, onKeyPress: onKeyPressProp }) => {
const onKeyPressRef = useRef();

Loading…
Cancel
Save