Skip to content

Commit

Permalink
gix for #73, hide on clickoutside for mobile devices
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFrankel committed Sep 4, 2018
1 parent 836c9a0 commit 96edf1a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-popper",
"version": "5.0.6",
"version": "5.1.6",
"description": "ngx-popper is an angular wrapper for popper.js",
"directories": {
"test": "test"
Expand Down
2 changes: 1 addition & 1 deletion src/popper-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ViewChild,
EventEmitter,
ViewEncapsulation,
HostListener, Renderer2, ViewRef, ViewContainerRef,
HostListener, Renderer2, ViewContainerRef,
} from "@angular/core";
import Popper from 'popper.js';
import {Placements, Triggers, PopperContentOptions} from './popper-model';
Expand Down
1 change: 1 addition & 0 deletions src/popper-directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export class PopperController implements OnInit, OnChanges {
if (this.timeoutAfterShow > 0) {
this.scheduledHide(null, this.timeoutAfterShow);
}
this.globalEventListeners.push(this.renderer.listen('document', 'touchend', this.hideOnClickOutsideHandler.bind(this)));
this.globalEventListeners.push(this.renderer.listen('document', 'click', this.hideOnClickOutsideHandler.bind(this)));
this.globalEventListeners.push(this.renderer.listen(this.getScrollParent(this.getRefElement()), 'scroll', this.hideOnScrollHandler.bind(this)));
}
Expand Down

0 comments on commit 96edf1a

Please sign in to comment.