Merge pull request #6238 from matrix-org/gsouquet/fix-17716

Fix modal opening race condition
pull/21833/head
Germain 2021-06-22 10:28:30 +01:00 committed by GitHub
commit f56216eec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ export class ModalManager {
</div> </div>
); );
ReactDOM.render(dialog, ModalManager.getOrCreateContainer()); setImmediate(() => ReactDOM.render(dialog, ModalManager.getOrCreateContainer()));
} else { } else {
// This is safe to call repeatedly if we happen to do that // This is safe to call repeatedly if we happen to do that
ReactDOM.unmountComponentAtNode(ModalManager.getOrCreateContainer()); ReactDOM.unmountComponentAtNode(ModalManager.getOrCreateContainer());