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

Fix modal opening race condition
This commit is contained in:
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

View file

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