Skip to content

Commit

Permalink
feat(snippets): method name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nattallius committed Apr 20, 2022
1 parent 1f7917a commit 38a4c5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/snippets/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ export class UIPSnippets extends UIPPlugin {
protected unbindEvents() {
this.$snippetList.removeEventListener('click', this._onListClick);
this.$dropdownControl.removeEventListener('click', this._onDropdownClick);
document.body.removeEventListener('mouseup', this._onOutsideAction, true);
document.body.removeEventListener('mouseup', this.onOutsideAction, true);
}

@bind
protected _onOutsideAction(e: Event) {
protected onOutsideAction(e: Event) {
const target = e.target as HTMLElement;
if (this.contains(target)) return false;
this.toggleDropdown();
Expand Down Expand Up @@ -178,9 +178,9 @@ export class UIPSnippets extends UIPPlugin {
toggleDropdown(): void {
const isOpen = this.classList.contains('dropdown-open');
if (isOpen) {
document.body.removeEventListener('mouseup', this._onOutsideAction, true);
document.body.removeEventListener('mouseup', this.onOutsideAction, true);
} else {
document.body.addEventListener('mouseup', this._onOutsideAction, true);
document.body.addEventListener('mouseup', this.onOutsideAction, true);
}
this.classList.toggle('dropdown-open');
}
Expand Down

0 comments on commit 38a4c5e

Please sign in to comment.