mirror of
https://github.com/Pathduck/pathduck.github.io.git
synced 2026-07-18 16:51:59 -04:00
added preventdefault test
This commit is contained in:
+2
-1
@@ -39,6 +39,7 @@
|
||||
[ 0 Jul 9 2022] <a class="DIR" href="./login/">login</a><br>
|
||||
[ 0 Dec 30 2022] <a class="DIR" href="./media-fullscreen/">media-fullscreen</a><br>
|
||||
[ 0 Jul 9 2022] <a class="DIR" href="./pdf/">pdf</a><br>
|
||||
[ 0 Jul 21 13:28] <a class="DIR" href="./preventdefault/">preventdefault</a><br>
|
||||
[ 0 Jul 14 19:33] <a class="DIR" href="./referrer/">referrer</a><br>
|
||||
[ 0 Jul 14 16:52] <a class="DIR" href="./session-storage/">session-storage</a><br>
|
||||
[ 0 Jul 9 2022] <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>
|
||||
|
||||
Executable
+24
@@ -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>
|
||||
Reference in New Issue
Block a user