Enable ESC and clicking background to close full screen dialog#8697
Enable ESC and clicking background to close full screen dialog#8697
Conversation
|
|
||
| // capture the ESC key globally | ||
| componentDidMount(){ | ||
| document.addEventListener('keydown', this.props.dismiss, false); |
There was a problem hiding this comment.
I think these new rules should respect this.props.showDismiss -- there may be instances we don't want to allow dismissal without action.
There was a problem hiding this comment.
Good idea - fixed
There was a problem hiding this comment.
git push? While you're in there can you apply code standard spacing?
|
|
|
@gravityrail can you replace the "cross-circle" Gridicon with either the "cross" or "cross-small" instead? Here's a screenshot of what the "cross-small" could look like there: |
|
@joanrho - icon updated, and screenshot in description @dereksmart - feedback addressed, going to dismiss your review so you can take another look :) |
|
Design review approved. Thanks for the edits, Dan! |
zinigor
left a comment
There was a problem hiding this comment.
Made one small change to remove bind calls from properties, otherwise LGTM whenever Travis finishes!
* Enable ESC and clicking background to close full screen dialog * Update gridicons and reposition close button on dialog * Better spacing * Only import the one gridicon we need * Revert unnecessary changes to gridicons * Fix JS error due to unbound handler * Fix event binding and restrict to ESC code * Fix eslint error * Removed bind calls from property assignments.
|
Ported to |



Fixes #7904
Changes proposed in this Pull Request:
Testing instructions:
This also moves the close button into the top-right corner of the dialog, and includes an updated gridicons file which includes the circular close icon. Other uses of gridicons should be re-tested to ensure I didn't break anything.
Proposed changelog entry for your changes:
Better usability for full-screen dialogs.