mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-10 01:46:43 +00:00
Merge pull request #9312 from overleaf/ds-remove-keyShortCut
Remove keyShortCut from compile function options GitOrigin-RevId: 31b13be5fd6742419d4147b89ef281b1b30227fb
This commit is contained in:
parent
7c20e7701b
commit
4843288b50
3 changed files with 5 additions and 10 deletions
|
@ -378,7 +378,7 @@ function PdfJsViewer({ url, pdfFile }) {
|
|||
(event.ctrlKey && event.key === '.')
|
||||
) {
|
||||
event.preventDefault()
|
||||
startCompile({ keyShortcut: true })
|
||||
startCompile()
|
||||
}
|
||||
},
|
||||
[initialised, setZoom, startCompile]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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'))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue