Skip to content

Commit

Permalink
use local doc variable instead of document
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-taran committed Oct 22, 2018
1 parent 45240f2 commit ea4964c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autocomplete.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export function autocomplete<T extends AutocompleteItem>(settings: AutocompleteS
input.removeEventListener(keyUpEventName, keyup);
input.removeEventListener("blur", blur);
window.removeEventListener("resize", resizeEventHandler);
document.removeEventListener("scroll", scrollEventHandler, true);
doc.removeEventListener("scroll", scrollEventHandler, true);
clearDebounceTimer();
clear();
}
Expand All @@ -417,7 +417,7 @@ export function autocomplete<T extends AutocompleteItem>(settings: AutocompleteS
input.addEventListener(keyUpEventName, keyup);
input.addEventListener("blur", blur);
window.addEventListener("resize", resizeEventHandler);
document.addEventListener("scroll", scrollEventHandler, true);
doc.addEventListener("scroll", scrollEventHandler, true);

return {
destroy
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autocompleter",
"version": "2.2.0",
"version": "2.2.1",
"description": "Blazing fast and lightweight autocomplete library without dependencies. 1KB gzipped.",
"main": "autocomplete.js",
"scripts": {
Expand Down

0 comments on commit ea4964c

Please sign in to comment.