Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mercury_editor
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review 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
project
mercury_editor
Merge requests
!39
Issue
#3421498
: Dialog unusable in Safari
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3421498
: Dialog unusable in Safari
issue/mercury_editor-3421498:3421498-dialog-unusable-in
into
2.1.x
Overview
0
Commits
1
Pipelines
0
Changes
4
Merged
John Ferris
requested to merge
issue/mercury_editor-3421498:3421498-dialog-unusable-in
into
2.1.x
1 year ago
Overview
0
Commits
1
Pipelines
0
Changes
4
Expand
Closes
#3421498
0
0
Merge request reports
Compare
2.1.x
2.1.x (base)
and
latest version
latest version
7c1de1f7
1 commit,
1 year ago
4 files
+
49
−
30
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Some changes are not shown
For a faster browsing experience, some files are collapsed by default.
Expand all files
Files
4
Search (e.g. *.vue) (Ctrl+P)
build/js/dialog.element.js
+
18
−
1
Options
@@ -288,6 +288,15 @@
this
.
returnValue
=
dialog
.
returnValue
;
this
.
dispatchEvent
(
new
Event
(
'
cancel
'
));
}
async
_keydownHandler
(
event
)
{
if
(
event
.
code
===
'
Escape
'
)
{
const
rootElement
=
this
.
getRootNode
();
const
domElement
=
rootElement
.
querySelector
(
`#
${
this
.
id
}
`
);
if
(
domElement
&&
!
this
.
hideCloseButton
&&
domElement
.
contains
(
rootElement
.
activeElement
))
{
this
.
_handleClose
();
}
}
}
render
()
{
return
y
`
<dialog
@@ -368,6 +377,12 @@
if
(
changedProperties
.
has
(
'
dock
'
)
||
changedProperties
.
has
(
'
push
'
)
||
changedProperties
.
has
(
'
modal
'
))
{
this
.
_pushBody
();
}
if
(
this
.
open
)
{
this
.
getRootNode
().
addEventListener
(
'
keydown
'
,
(
e
)
=>
this
.
_keydownHandler
(
e
));
}
else
{
this
.
getRootNode
().
removeEventListener
(
'
keydown
'
,
(
e
)
=>
this
.
_keydownHandler
(
e
));
}
}
/**
* showModal
@@ -553,7 +568,9 @@
background-color: var(--me-dialog-main-background-color, #fff);
padding: var(--me-dialog-main-space-inset-y, var(--me-space-inset-y, 20px)) var(--me-dialog-main-space-inset-y, var(--me-space-inset-y, 20px));
overflow-y: auto;
flex: 1 1 fit-content;
flex-grow: 1;
flex-shrink: 1;
flex-basis: fit-content;
}
.buttons {
Loading