Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
d4bb3c4a
Unverified
Commit
d4bb3c4a
authored
4 years ago
by
Dalton
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make 'esc' button work with full page modal (#14882)
* Make 'esc' button work with full page modal * Rmv explicit bind
parent
0b1c1562
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/metabase/components/Modal.jsx
+10
-4
10 additions, 4 deletions
frontend/src/metabase/components/Modal.jsx
with
10 additions
and
4 deletions
frontend/src/metabase/components/Modal.jsx
+
10
−
4
View file @
d4bb3c4a
...
...
@@ -56,11 +56,11 @@ export class WindowModal extends Component {
}
}
handleDismissal
()
{
handleDismissal
=
()
=>
{
if
(
this
.
props
.
onClose
)
{
this
.
props
.
onClose
();
}
}
}
;
_modalComponent
()
{
const
className
=
cx
(
...
...
@@ -70,7 +70,7 @@ export class WindowModal extends Component {
.
map
(
type
=>
`Modal--
${
type
}
`
),
);
return
(
<
OnClickOutsideWrapper
handleDismissal
=
{
this
.
handleDismissal
.
bind
(
this
)
}
>
<
OnClickOutsideWrapper
handleDismissal
=
{
this
.
handleDismissal
}
>
<
div
className
=
{
cx
(
className
,
"
relative bg-white rounded
"
)
}
>
{
getModalContent
({
...
this
.
props
,
...
...
@@ -160,6 +160,12 @@ export class FullPageModal extends Component {
},
300
);
}
handleDismissal
=
()
=>
{
if
(
this
.
props
.
onClose
)
{
this
.
props
.
onClose
();
}
};
_renderModal
(
open
)
{
ReactDOM
.
unstable_renderSubtreeIntoContainer
(
this
,
...
...
@@ -177,7 +183,7 @@ export class FullPageModal extends Component {
occupies the entire screen. We do this to put this modal on top of
the OnClickOutsideWrapper popover stack. Otherwise, clicks within
this modal might be seen as clicks outside another popover. */
}
<
OnClickOutsideWrapper
>
<
OnClickOutsideWrapper
handleDismissal
=
{
this
.
handleDismissal
}
>
<
div
className
=
"full-height relative scroll-y"
style
=
{
motionStyle
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment