mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Support dismissing the dialog just with Enter.
This commit is contained in:
parent
a91de6c3a5
commit
c88cb4574e
1 changed files with 12 additions and 0 deletions
|
@ -21,3 +21,15 @@ define [
|
|||
navToInnerStep2 = () ->
|
||||
$scope.innerStep = 2
|
||||
$scope.ui.leftMenuShown = true
|
||||
|
||||
handleKeypress = (e) ->
|
||||
if e.keyCode == 13
|
||||
if $scope.innerStep == 1
|
||||
$scope.turnCodeCheckOn()
|
||||
else
|
||||
$scope.dismiss()
|
||||
|
||||
$(document).on "keypress", handleKeypress
|
||||
|
||||
$scope.$on "$destroy", () ->
|
||||
$(document).off "keypress", handleKeypress
|
Loading…
Reference in a new issue