Commit a2c676de authored by up730418's avatar up730418 Committed by yann300

Fix unable to click top left and typing bug

parent ee58de92
......@@ -40,13 +40,11 @@ module.exports = (title, content, ok, cancel) => {
}
function modalKeyEvent (e) {
e.preventDefault()
if (e.keyCode === 27) {
cancelListener()
} else if (e.keyCode === 13) {
e.preventDefault()
okListener()
} else {
// Do nothing
}
}
......@@ -74,6 +72,7 @@ module.exports = (title, content, ok, cancel) => {
function html () {
return yo`<div id="modal-dialog" class="${css.modal}">
<div id="modal-background" class="${css['modalBackground']}"> </div>
<div class="${css['modalContent']}">
<div class="${css['modalHeader']}">
<h2></h2>
......@@ -85,6 +84,5 @@ function html () {
<span id="modal-footer-ok" class=${css['modalFooterOk']}>OK</span><span id="modal-footer-cancel" class=${css['modalFooterCancel']}>Cancel</span>
</div>
</div>
<div id="modal-background" class="${css['modalBackground']}"> </div>
</div>`
}
......@@ -73,6 +73,12 @@ var css = csjs`
color: ${styles.remix.modalDialog_Header_Footer_Color};
cursor: pointer;
}
.modalBackground {
width: 100%;
height: 100%;
position: fixed;
top:0;
}
@-webkit-keyframes animatetop {
from {top: -300px; opacity: 0}
to {top: 0; opacity: 1}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment