Merge pull request #9312 from overleaf/ds-remove-keyShortCut

Remove keyShortCut from compile function options

GitOrigin-RevId: 31b13be5fd6742419d4147b89ef281b1b30227fb
This commit is contained in:
Alf Eaton 2022-08-19 09:51:53 +01:00 committed by Copybot
parent 7c20e7701b
commit 4843288b50
3 changed files with 5 additions and 10 deletions

View file

@ -378,7 +378,7 @@ function PdfJsViewer({ url, pdfFile }) {
(event.ctrlKey && event.key === '.')
) {
event.preventDefault()
startCompile({ keyShortcut: true })
startCompile()
}
},
[initialised, setZoom, startCompile]

View file

@ -12,14 +12,14 @@ export const Shortcuts = ({ children }) => {
case 's':
case 'Enter':
event.preventDefault()
startCompile({ keyShortcut: true })
startCompile()
break
}
} else if (event.ctrlKey) {
switch (event.key) {
case '.':
event.preventDefault()
startCompile({ keyShortcut: true })
startCompile()
break
}
}

View file

@ -346,16 +346,11 @@ If the project has been renamed please look in your project list for a new proje
}
})
// note: { keyShortcut: true } exists only for tracking purposes.
$scope.recompileViaKey = () => {
if ($scope.recompile) {
$scope.recompile({ keyShortcut: true })
$scope.recompile()
} else {
window.dispatchEvent(
new CustomEvent('pdf:recompile', {
detail: { keyShortcut: true },
})
)
window.dispatchEvent(new CustomEvent('pdf:recompile'))
}
}