Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc1ee33a

Browse files
authored
Selector: Remove the "a:enabled" workaround for Chrome <=77
Remove the workaround for a broken `:enabled` pseudo-class on anchor elementsin Chrome <=77. These versions of Chrome considers anchor elements with the`href` attribute as matching `:enabled`.Closesgh-4569
1 parentf1c16de commitc1ee33a

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

‎src/selector/rbuggyQSA.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@ var rbuggyQSA = [],
66
testEl=document.createElement("div"),
77
input=document.createElement("input");
88

9-
testEl.innerHTML="<a href=''></a>";
10-
11-
// Support: Chrome 38 - 77 only
12-
// Chrome considers anchor elements with href to match ":enabled"
13-
// See https://bugs.chromium.org/p/chromium/issues/detail?id=993387
14-
if(testEl.querySelectorAll(":enabled").length){
15-
rbuggyQSA.push(":enabled");
16-
}
17-
189
// Support: IE 9 - 11+
1910
// IE's :disabled selector does not pick up the children of disabled fieldsets
2011
if(isIE){

‎test/unit/selector.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ QUnit.module( "selector", {
22
beforeEach:function(){
33
this.safari=/\bsafari\b/i.test(navigator.userAgent)&&
44
!/\bchrome\b/i.test(navigator.userAgent);
5-
this.chrome=/\bchrome\b/i.test(navigator.userAgent)&&
6-
!/\bedge\b/i.test(navigator.userAgent);
75
},
86
afterEach:moduleTeardown
97
});
@@ -1379,9 +1377,7 @@ QUnit.test( "pseudo - :(dis|en)abled, explicitly disabled", function( assert ) {
13791377
"disabled-select","disabled-optgroup","disabled-option"]
13801378
);
13811379

1382-
if(QUnit.jQuerySelectors||!this.chrome){
1383-
// Support: Chrome 75+
1384-
// Chrome recognizes anchor elements as enabled.
1380+
if(QUnit.jQuerySelectors){
13851381
assert.t(
13861382
"Enabled elements",
13871383
"#enabled-fieldset :enabled",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp