Closing Dialog with transition blocks page interaction
See original GitHub issueUsing 1.0.0-beta.21
.
I have something like this:
<Dialog
fullScreen
open={this.addProductDialogOpen}
transition={props => <Slide direction="up" {...props} />}
onRequestClose={this.handleAddProductClose}
>
<AppBar className={classes.appBar}>
<Toolbar>
<IconButton
color="contrast"
disableRipple
onClick={this.handleAddProductClose}
>
<CloseIcon />
</IconButton>
<Typography type="title" color="inherit" className={classes.flex}>
Select product
</Typography>
</Toolbar>
</AppBar>
<DialogContent>
<Autocomplete
getOptions={() => options()}
onSuggestionSelected={this.handleAddProduct}
/>
</DialogContent>
</Dialog>
When closing the dialog the <div data-mui-portal="true">
remains and, although the contents are not visible, it blocks any interaction with the page.
If I remove transition={props => <Slide direction="up" {...props} />}
the div is removed on close.
I see the same behaviour (div remains attached) with the docs demo but there there’s no obstruction.
Anything I can do do provide more info ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Closing Dialog with transition blocks page interaction #9290
When closing the dialog the <div data-mui-portal="true"> remains and, although the contents are not visible, it blocks any interaction with the ...
Read more >Building a dialog component - web.dev
The dialog element comes with a close event: it emits immediately when the dialog close() function is called. Since we're animating this element ......
Read more >Best way to block closing Dialog by clicking away? - Twine Q&A
The main thing to focus on is the 'if/else' block in the first (JavaScript) code section. It toggles the user's ability to dismiss...
Read more >Don't close Dialog(Modal) when click outside in React ...
I'm using HeadlessUI's Dialog component for React in my app and when I click out of modal I wish it wouldn't close. In...
Read more >Dialogs - Material Design
A simple dialog allows the following interactions: Tap an action to choose it and close the dialog; Tap outside the dialog to close...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Duplicate of #8919
Move the transition component definition outside of the rendering method.
@the-noob I’m happy to hear it’s fixing your issue. I hope this case was better handled.
Thank you! You can always support me or the community, an announcement is coming #9460 🎄 .