forked from mirrors/Scribe.js
onKeyDown function listener
This commit is contained in:
parent
82b494a7b2
commit
830ffa134e
2 changed files with 7 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body ng-keydown="sidebar = $event.keyCode == 27 ? false : sidebar">
|
<body ng-keydown="onKeyDown">
|
||||||
|
|
||||||
<header class="header">
|
<header class="header">
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,12 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$rootScope.onKeyDown = function ($event) {
|
||||||
|
if ($event.keyCode == 27) {
|
||||||
|
$rootScope.sidebar = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue