这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions demo/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
div,
input,
textarea,
h1,
h2 {
font-family: arial, sans-serif;
}

div {
margin: 1em 0;
}

div[contenteditable] {
width: 10em;
min-height: 2em;
padding: 0.2em;
border: 1px solid #000;
}

label {
display: block;
margin: 1em 0;
}

select {
width: 10em;
}

.js-focus-visible :focus:not(.focus-visible) {
outline: 0;
}
30 changes: 1 addition & 29 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,7 @@
<!-- Original test page written by Dominic Mazzoni -->
<title>focus-visible class demo</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
div,input,textarea,h1,h2 {
font-family: arial, sans-serif;
}

div {
margin: 1em 0;
}

div[contenteditable] {
width: 10em;
min-height: 2em;
padding: 0.2em;
border: 1px solid #000;
}

label {
display: block;
margin: 1em 0;
}

select {
width: 10em;
}

:focus:not(.focus-visible) {
outline: 0;
}
</style>
<link rel="stylesheet" href="./demo.css">
</head>
<body>
<h1>Keyboard-only focus test</h1>
Expand Down
1 change: 0 additions & 1 deletion src/focus-visible.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ function init() {
var hadKeyboardEvent = true;
var hadFocusVisibleRecently = false;
var hadFocusVisibleRecentlyTimeout = null;
var elWithFocusRing;

var inputTypesWhitelist = {
text: true,
Expand Down