🐛 Fix issue that ctrl + o did behave wrong on workflow templates page (#2934)

* N8N-3094 Workflow Templates cmd-o acts on the Preview/Iframe

* N8N-3094 Workflow Templates cmd-o acts on the Preview/Iframe

* disable shortcuts for preview

Co-authored-by: Mutasem <mutdmour@gmail.com>
This commit is contained in:
Oliver Trajceski 2022-03-04 18:04:04 +01:00 committed by GitHub
parent 2ec711aeb5
commit f4e3255b24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -729,12 +729,18 @@ export default mixins(
// Open workflow dialog
e.stopPropagation();
e.preventDefault();
if (this.isDemo) {
return;
}
this.$store.dispatch('ui/openModal', WORKFLOW_OPEN_MODAL_KEY);
} else if (e.key === 'n' && this.isCtrlKeyPressed(e) === true && e.altKey === true) {
// Create a new workflow
e.stopPropagation();
e.preventDefault();
if (this.isDemo) {
return;
}
if (this.$router.currentRoute.name === 'NodeViewNew') {
this.$root.$emit('newWorkflow');