-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix self-closing modals regression Signed-off-by: Emanuele Feliziani <[email protected]> * Fix hotel check-ins dates false matches as cc exp Signed-off-by: Emanuele Feliziani <[email protected]> * Improve comment Signed-off-by: Emanuele Feliziani <[email protected]> --------- Signed-off-by: Emanuele Feliziani <[email protected]>
- Loading branch information
1 parent
84127e0
commit 392883b
Showing
14 changed files
with
435 additions
and
80 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>Signup form within a modal</title> | ||
<link rel="stylesheet" href="./style.css" /> | ||
</head> | ||
|
||
<body> | ||
<p><a href="../index.html">[Home]</a></p> | ||
|
||
<p id="demo"><button type="button" id="open-modal">Click here to open dialog</button></p> | ||
|
||
<p id="random-text">Some random text to use as "something outside the dialog element". Clicking here should close the dialog (if open).</p> | ||
|
||
<div class="dialog" hidden> | ||
<form action="/signup" id="signup"> | ||
<h2>Signup</h2> | ||
<fieldset> | ||
<label for="email">Email</label> | ||
<input id="email" type="email"> | ||
<label for="password">Password</label> | ||
<input id="password" type="password"> | ||
<button type="submit">Signup</button> | ||
</fieldset> | ||
</form> | ||
</div> | ||
<script type="module"> | ||
const openModalBtn = document.getElementById('open-modal') | ||
const dialogEl = document.querySelector('.dialog') | ||
openModalBtn.addEventListener('click', () => { | ||
dialogEl.removeAttribute('hidden') | ||
window.addEventListener('keydown', (e) => { | ||
if (e.key === 'Escape') {dialogEl.setAttribute('hidden', '')} | ||
}, {once: true}) | ||
window.addEventListener('pointerdown', (e) => { | ||
if (!dialogEl.contains(e.target)) {dialogEl.setAttribute('hidden', '')} | ||
}) | ||
}) | ||
|
||
const form = document.forms.login; | ||
form.addEventListener("submit", (e) => { | ||
e.preventDefault(); | ||
if (form.checkValidity()) { | ||
setTimeout(() => dialogEl.innerHTML = '<h1>Submitted!</h1>', 100) | ||
} | ||
}) | ||
</script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/Form/matching-config/__generated__/compiled-matching-config.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.