fix: copy and paste shortcut in the textarea of the workflow run panel (#8345)
This commit is contained in:
parent
5f03e66489
commit
8d2269f762
1 changed files with 6 additions and 4 deletions
|
|
@ -70,15 +70,16 @@ export const useShortcuts = (): void => {
|
||||||
})
|
})
|
||||||
|
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.c`, (e) => {
|
||||||
const { showDebugAndPreviewPanel, showInputsPanel } = workflowStore.getState()
|
const { showDebugAndPreviewPanel } = workflowStore.getState()
|
||||||
if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel && !showInputsPanel) {
|
if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
handleNodesCopy()
|
handleNodesCopy()
|
||||||
}
|
}
|
||||||
}, { exactMatch: true, useCapture: true })
|
}, { exactMatch: true, useCapture: true })
|
||||||
|
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, (e) => {
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.v`, (e) => {
|
||||||
if (shouldHandleShortcut(e)) {
|
const { showDebugAndPreviewPanel } = workflowStore.getState()
|
||||||
|
if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
handleNodesPaste()
|
handleNodesPaste()
|
||||||
}
|
}
|
||||||
|
|
@ -99,7 +100,8 @@ export const useShortcuts = (): void => {
|
||||||
}, { exactMatch: true, useCapture: true })
|
}, { exactMatch: true, useCapture: true })
|
||||||
|
|
||||||
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.z`, (e) => {
|
useKeyPress(`${getKeyboardKeyCodeBySystem('ctrl')}.z`, (e) => {
|
||||||
if (shouldHandleShortcut(e)) {
|
const { showDebugAndPreviewPanel } = workflowStore.getState()
|
||||||
|
if (shouldHandleShortcut(e) && !showDebugAndPreviewPanel) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
workflowHistoryShortcutsEnabled && handleHistoryBack()
|
workflowHistoryShortcutsEnabled && handleHistoryBack()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue