added preventdefault test

This commit is contained in:
Stian Lund
2023-07-21 14:28:10 +02:00
parent 7853530226
commit 00dd5d05f2
2 changed files with 26 additions and 1 deletions
+2 -1
View File
@@ -39,6 +39,7 @@
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;&nbsp;9&nbsp;&nbsp;2022]&nbsp;&nbsp;<a class="DIR" href="./login/">login</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Dec&nbsp;30&nbsp;&nbsp;2022]&nbsp;&nbsp;<a class="DIR" href="./media-fullscreen/">media-fullscreen</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;&nbsp;9&nbsp;&nbsp;2022]&nbsp;&nbsp;<a class="DIR" href="./pdf/">pdf</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;21&nbsp;13:28]&nbsp;&nbsp;<a class="DIR" href="./preventdefault/">preventdefault</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;14&nbsp;19:33]&nbsp;&nbsp;<a class="DIR" href="./referrer/">referrer</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;14&nbsp;16:52]&nbsp;&nbsp;<a class="DIR" href="./session-storage/">session-storage</a><br>
[&nbsp;&nbsp;&nbsp;0&nbsp;Jul&nbsp;&nbsp;9&nbsp;&nbsp;2022]&nbsp;&nbsp;<a class="DIR" href="./translate/">translate</a><br>
@@ -49,7 +50,7 @@
</p>
<p>
15 directories, 1 file
16 directories, 1 file
<br><br>
</p>
</html>
+24
View File
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Vivaldi Fast Forward vs. preventDefault()</title>
</head>
<body>
<p>You cannot use Space inside the input:</p>
<p><input autofocus></p>
<p>Press ESC to escape the input and press Space.</code></p>
<p>The link should not be followed if Space is blocked by <code>event.preventDefault()</code> - or should it?</p>
<p><a href="https://example.com/" rel="next">Next</a></p>
<script>
window.onkeydown = function (event) {
if (event.keyCode === 32) {
event.preventDefault();
//event.stopImmediatePropagation();
//event.stopPropagation();
}
};
</script>
</body>
</html>