We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6005aa1 commit 06fc732Copy full SHA for 06fc732
docs/app/src/search.js
@@ -202,13 +202,13 @@ angular.module('search', [])
202
};
203
})
204
205
-.directive('docsSearchInput', ['$document',function($document) {
+.directive('docsSearchInput', ['$document', function($document) {
206
return function(scope, element, attrs) {
207
var ESCAPE_KEY_KEYCODE = 27,
208
FORWARD_SLASH_KEYCODE = 191;
209
angular.element($document[0].body).on('keydown', function(event) {
210
var input = element[0];
211
- if (event.keyCode === FORWARD_SLASH_KEYCODE && window.document.activeElement !== input) {
+ if (event.keyCode === FORWARD_SLASH_KEYCODE && $document[0].activeElement !== input) {
212
event.stopPropagation();
213
event.preventDefault();
214
input.focus();
0 commit comments