-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialogs:Esc key closed the two dialog #3280
Comments
@meiguanxiHXX You can add Check out this fiddle for an example: https://codesandbox.io/s/xll8q8v7mp |
@tgreen7 what about if the inner dialog has canEscapeKeyClose={false} but the first dialog does not.. How do we stop propagation in that case? Thanks in advance! https://codesandbox.io/s/blueprintjs-playground-forked-pqqd74 |
@tgreen7 answering my own question - I think to do that means manually catching the esc key event and preventing dialog close: https://codesandbox.io/s/blueprintjs-playground-forked-5onri8?file=/App.js |
I think you may be able to implement a "stop propagation" boundary for the inner Dialog with the new feature we just added to Portal & overlayable components: #6093 (to be released this week). <Dialog stopPropagationEvents={["keyDown", "keyUp"]}> (it's unlikely to be backported to Blueprint v3.x, though, as I see that's being used in @tnrich's code sandbox link) |
I had try put a new dialog in the dialog,I wish only close the new dialog when I fisrt press ESC key,maybe next press will close the old dialog. In fact, I did this it closed all dialog.
any help? thank you!
The text was updated successfully, but these errors were encountered: