From d6dcc9395ffe3321c7c7d247180d216df53372b1 Mon Sep 17 00:00:00 2001 From: John Benavides Date: Sat, 23 Dec 2017 15:52:35 +0100 Subject: [PATCH] remove portal div on unmount --- src/components/modal/modal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/modal/modal.js b/src/components/modal/modal.js index fade0592..c28027a3 100644 --- a/src/components/modal/modal.js +++ b/src/components/modal/modal.js @@ -49,6 +49,7 @@ export default class Modal extends PureComponent { if (this.props.closeOnEsc) { d.removeEventListener('keydown', this.handleKeydown); } + this.portalElement.remove(); } getDocument = () => {