Skip to content

Commit

Permalink
Autoprompt follow ups after PR review (#91)
Browse files Browse the repository at this point in the history
* Update links to Home

Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>

* Use more expressive naming

Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>

* Add submit listeners to avoid confusion on Android

Signed-off-by: Emanuele Feliziani <feliziani.emanuele@gmail.com>
  • Loading branch information
GioSensation authored Aug 4, 2022
1 parent f90b705 commit d416e06
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</head>

<body>
<p><a href="../index.html">[Home]</a></p>
<p><a href="../../index.html">[Home]</a></p>
<nav>
<ul class="nav">
<li><a href="./case-1.html">Case 1</a></li>
<li><a href="./case-2.html">Case 2</a></li>
<li><a href="./case-3.html">Case 3</a></li>
<li><a href="./case-4.html">Case 4</a></li>
<li><a href="./case-5.html">Case 5</a></li>
<li><a href="./1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./2-form-in-modal.html">Form in modal</a></li>
<li><a href="./3-multistep-form.html">Multistep login form</a></li>
<li><a href="./4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</nav>

Expand Down Expand Up @@ -44,8 +44,9 @@ <h3>Sign in form</h3>
e.preventDefault();
e.stopImmediatePropagation();
clickForm.outerHTML = '<h1>Submitted!</h1>';
}
};
button?.addEventListener('click', handler, true);
clickForm?.addEventListener('submit', handler, true);
</script>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</head>

<body>
<p><a href="../index.html">[Home]</a></p>
<p><a href="../../index.html">[Home]</a></p>
<nav>
<ul class="nav">
<li><a href="./case-1.html">Case 1</a></li>
<li><a href="./case-2.html">Case 2</a></li>
<li><a href="./case-3.html">Case 3</a></li>
<li><a href="./case-4.html">Case 4</a></li>
<li><a href="./case-5.html">Case 5</a></li>
<li><a href="./1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./2-form-in-modal.html">Form in modal</a></li>
<li><a href="./3-multistep-form.html">Multistep login form</a></li>
<li><a href="./4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</nav>

Expand All @@ -31,7 +31,7 @@
<script>
const initialButton = document.querySelector('button');
initialButton.addEventListener('click', () => {
const formEl = `<form id="click-form" novalidate action="./case-3.html">
const formEl = `<form id="click-form" novalidate action="3-multistep-form.html">
<h3>Sign in form dia</h3>
<fieldset>
<label for="email">Email</label>
Expand All @@ -47,10 +47,11 @@ <h3>Sign in form dia</h3>
const handler = (e) => {
e.preventDefault();
e.stopImmediatePropagation();
window.location.href = './case-3.html'
}
window.location.href = '3-multistep-form.html';
};
button?.addEventListener('click', handler, true);
})
clickForm?.addEventListener('submit', handler, true);
});
</script>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</head>

<body>
<p><a href="../index.html">[Home]</a></p>
<p><a href="../../index.html">[Home]</a></p>
<nav>
<ul class="nav">
<li><a href="./case-1.html">Case 1</a></li>
<li><a href="./case-2.html">Case 2</a></li>
<li><a href="./case-3.html">Case 3</a></li>
<li><a href="./case-4.html">Case 4</a></li>
<li><a href="./case-5.html">Case 5</a></li>
<li><a href="./1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./2-form-in-modal.html">Form in modal</a></li>
<li><a href="./3-multistep-form.html">Multistep login form</a></li>
<li><a href="./4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</nav>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</head>

<body>
<p><a href="../index.html">[Home]</a></p>
<p><a href="../../index.html">[Home]</a></p>
<nav>
<ul class="nav">
<li><a href="./case-1.html">Case 1</a></li>
<li><a href="./case-2.html">Case 2</a></li>
<li><a href="./case-3.html">Case 3</a></li>
<li><a href="./case-4.html">Case 4</a></li>
<li><a href="./case-5.html">Case 5</a></li>
<li><a href="./1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./2-form-in-modal.html">Form in modal</a></li>
<li><a href="./3-multistep-form.html">Multistep login form</a></li>
<li><a href="./4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</nav>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
</head>

<body>
<p><a href="../index.html">[Home]</a></p>
<p><a href="../../index.html">[Home]</a></p>
<nav>
<ul class="nav">
<li><a href="./case-1.html">Case 1</a></li>
<li><a href="./case-2.html">Case 2</a></li>
<li><a href="./case-3.html">Case 3</a></li>
<li><a href="./case-4.html">Case 4</a></li>
<li><a href="./case-5.html">Case 5</a></li>
<li><a href="./1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./2-form-in-modal.html">Form in modal</a></li>
<li><a href="./3-multistep-form.html">Multistep login form</a></li>
<li><a href="./4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</nav>

Expand Down Expand Up @@ -52,8 +52,9 @@ <h3>Sign in form</h3>
e.preventDefault();
e.stopImmediatePropagation();
clickForm.outerHTML = '<h1>Submitted!</h1>';
}
};
button?.addEventListener('click', handler, true);
clickForm?.addEventListener('submit', handler, true);
</script>
</div>

Expand Down
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ <h2>Autofill</h2>
<li><a href="./autofill/form-submission.html">Form submission detection and autofill</a></li>
<li><a href="./autofill/frame-form-submission-parent.html">Form submission detection and autofill within an iframe</a></li>
<li>
Autoprompt
Autoprompt credentials autofill when a login form is front and center
<ul>
<li><a href="./autofill/autoprompt/case-1.html">Case 1</a></li>
<li><a href="./autofill/autoprompt/case-2.html">Case 2</a></li>
<li><a href="./autofill/autoprompt/case-3.html">Case 3</a></li>
<li><a href="./autofill/autoprompt/case-4.html">Case 4</a></li>
<li><a href="./autofill/autoprompt/case-5.html">Case 5</a></li>
<li><a href="./autofill/autoprompt/1-standard-login-form.html">Form present on pageload</a></li>
<li><a href="./autofill/autoprompt/2-form-in-modal.html">Form in modal</a></li>
<li><a href="./autofill/autoprompt/3-multistep-form.html">Multistep login form</a></li>
<li><a href="./autofill/autoprompt/4-covered-form.html">With dialog covering the form</a></li>
<li><a href="./autofill/autoprompt/5-form-with-text.html">Form below the fold on mobile but in sidebar on larger screens</a></li>
</ul>
</li>
</ul>
Expand Down

0 comments on commit d416e06

Please sign in to comment.