mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #5015 from overleaf/ae-recompile-on-save
Recompile on save key press when PDF preview is focused GitOrigin-RevId: 9f2c2c5de44c665c9d4c240fb418b9dc321e3523
This commit is contained in:
parent
69482d9d3c
commit
28082e64ff
2 changed files with 14 additions and 0 deletions
|
@ -98,6 +98,8 @@ block content
|
|||
custom-toggler-pane=hasFeature('custom-togglers') ? "west" : false
|
||||
custom-toggler-msg-when-open=hasFeature('custom-togglers') ? translate("tooltip_hide_filetree") : false
|
||||
custom-toggler-msg-when-closed=hasFeature('custom-togglers') ? translate("tooltip_show_filetree") : false
|
||||
ng-keydown="handleKeyDown($event)"
|
||||
tabindex="0"
|
||||
)
|
||||
.ui-layout-west
|
||||
include ./editor/file-tree-react
|
||||
|
|
|
@ -314,6 +314,18 @@ If the project has been renamed please look in your project list for a new proje
|
|||
$scope.switchToSideBySideLayout()
|
||||
}
|
||||
|
||||
$scope.handleKeyDown = event => {
|
||||
if (event.shiftKey || event.altKey) {
|
||||
return
|
||||
}
|
||||
|
||||
// Ctrl+s or Cmd+s => recompile
|
||||
if (event.key === 's' && (event.metaKey || event.ctrlKey)) {
|
||||
event.preventDefault()
|
||||
$scope.recompileViaKey()
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
;({ userAgent } = navigator)
|
||||
ide.browserIsSafari =
|
||||
|
|
Loading…
Reference in a new issue