Skip to content

Commit 06fc732

Browse files
sathifypetebacondarwin
authored andcommitted
chore(docs): use $document[0]
1 parent 6005aa1 commit 06fc732

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/app/src/search.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,13 @@ angular.module('search', [])
202202
};
203203
})
204204

205-
.directive('docsSearchInput', ['$document',function($document) {
205+
.directive('docsSearchInput', ['$document', function($document) {
206206
return function(scope, element, attrs) {
207207
var ESCAPE_KEY_KEYCODE = 27,
208208
FORWARD_SLASH_KEYCODE = 191;
209209
angular.element($document[0].body).on('keydown', function(event) {
210210
var input = element[0];
211-
if (event.keyCode === FORWARD_SLASH_KEYCODE && window.document.activeElement !== input) {
211+
if (event.keyCode === FORWARD_SLASH_KEYCODE && $document[0].activeElement !== input) {
212212
event.stopPropagation();
213213
event.preventDefault();
214214
input.focus();

0 commit comments

Comments
 (0)