Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
enable scroll when isOpen is set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed May 15, 2018
1 parent edce36d commit 7150bd3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/mdc-dialog/foundation.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export default class MDCDialogFoundation extends MDCFoundation {
this.adapter_.deregisterTransitionEndHandler(this.transitionEndHandler_);
this.adapter_.removeClass(MDCDialogFoundation.cssClasses.ANIMATING);
this.adapter_.removeClass(MDCDialogFoundation.cssClasses.OPEN);
this.enableScroll_();
}
this.enableScroll_();
}

open() {
Expand All @@ -93,6 +93,7 @@ export default class MDCDialogFoundation extends MDCFoundation {

close() {
this.isOpen_ = false;
this.enableScroll_();
this.adapter_.deregisterSurfaceInteractionHandler('click', this.dialogClickHandler_);
this.adapter_.deregisterDocumentKeydownHandler(this.documentKeydownHandler_);
this.adapter_.deregisterInteractionHandler('click', this.componentClickHandler_);
Expand Down Expand Up @@ -137,8 +138,6 @@ export default class MDCDialogFoundation extends MDCFoundation {
this.adapter_.removeClass(MDCDialogFoundation.cssClasses.ANIMATING);
if (this.isOpen_) {
this.adapter_.trapFocusOnSurface();
} else {
this.enableScroll_();
};
};
};
Expand Down

0 comments on commit 7150bd3

Please sign in to comment.