Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7648811

Browse files
sathifypetebacondarwin
authored andcommitted
chore(docs): use $document[0]
1 parent e1c683b commit 7648811

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/app/src/search.js

Lines changed: 2 additions & 2 deletions
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)