fix(overlay): fix pointer events for ie11 (#3023)

Fixes #3022
This commit is contained in:
Kara
2017-02-10 13:31:33 -08:00
committed by tinayuangao
parent 40bc486fa4
commit 597e3de5c8
3 changed files with 4 additions and 3 deletions
@@ -40,7 +40,7 @@ describe('Overlay directives', () => {
expect(overlayContainerElement.textContent).toContain('Menu content');
expect(getPaneElement().style.pointerEvents)
.toBeFalsy('Expected the overlay pane to enable pointerEvents when attached.');
.toBe('auto', 'Expected the overlay pane to enable pointerEvents when attached.');
fixture.componentInstance.isOpen = false;
fixture.detectChanges();
+1 -1
View File
@@ -128,7 +128,7 @@ export class OverlayRef implements PortalHost {
/** Toggles the pointer events for the overlay pane element. */
private _togglePointerEvents(enablePointer: boolean) {
this._pane.style.pointerEvents = enablePointer ? null : 'none';
this._pane.style.pointerEvents = enablePointer ? 'auto' : 'none';
}
/** Attaches a backdrop for this overlay. */
+2 -1
View File
@@ -67,10 +67,11 @@ describe('Overlay', () => {
let paneElement = overlayRef.overlayElement;
overlayRef.attach(componentPortal);
viewContainerFixture.detectChanges();
expect(paneElement.childNodes.length).not.toBe(0);
expect(paneElement.style.pointerEvents)
.toBeFalsy('Expected the overlay pane to enable pointerEvents when attached.');
.toBe('auto', 'Expected the overlay pane to enable pointerEvents when attached.');
overlayRef.detach();