Skip to content

Commit

Permalink
fix(menu): getBackdropElement
Browse files Browse the repository at this point in the history
references #7125
  • Loading branch information
manucorporat committed Jul 2, 2016
1 parent 01c7c1a commit cac1d4f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/backdrop/backdrop.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Directive, Input } from '@angular/core';
import { Directive, ElementRef, Input } from '@angular/core';

import { AppRoot } from '../app/app';
import { isTrueProperty } from '../../util/util';
Expand Down Expand Up @@ -39,7 +39,7 @@ export class Backdrop {
private pushed: boolean = false;
@Input() disableScroll = true;

constructor(private _appRoot: AppRoot) {}
constructor(private _appRoot: AppRoot, private _elementRef: ElementRef) {}

ngOnInit() {
if (isTrueProperty(this.disableScroll)) {
Expand All @@ -55,4 +55,8 @@ export class Backdrop {
}
}

getNativeElement(): HTMLElement {
return this._elementRef.nativeElement;
}

}
2 changes: 1 addition & 1 deletion src/components/menu/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ export class Menu extends Ion {
* @private
*/
getBackdropElement(): HTMLElement {
return this.backdrop.elementRef.nativeElement;
return this.backdrop.getNativeElement();
}

/**
Expand Down

0 comments on commit cac1d4f

Please sign in to comment.