Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
ee3eb6ca
Commit
ee3eb6ca
authored
Oct 24, 2011
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #10567. Make sure quickIs matches correct class name.
parent
09c089aa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
event.js
src/event.js
+1
-1
event.js
test/unit/event.js
+8
-0
No files found.
src/event.js
View file @
ee3eb6ca
...
@@ -16,7 +16,7 @@ var rnamespaces = /\.(.*)$/,
...
@@ -16,7 +16,7 @@ var rnamespaces = /\.(.*)$/,
// 0 1 2 3 4 5
// 0 1 2 3 4 5
// [ _, tag, id, class, attrName, attrValue ]
// [ _, tag, id, class, attrName, attrValue ]
quick
[
1
]
=
(
quick
[
1
]
||
""
).
toLowerCase
();
quick
[
1
]
=
(
quick
[
1
]
||
""
).
toLowerCase
();
quick
[
3
]
=
quick
[
3
]
&&
new
RegExp
(
"
\\
b"
+
quick
[
3
]
+
"
\\
b
"
);
quick
[
3
]
=
quick
[
3
]
&&
new
RegExp
(
"
(?:^|
\\
w)"
+
quick
[
3
]
+
"(?:
\\
w|$)
"
);
}
}
return
quick
;
return
quick
;
},
},
...
...
test/unit/event.js
View file @
ee3eb6ca
...
@@ -2452,6 +2452,14 @@ test("delegated events quickIs", function() {
...
@@ -2452,6 +2452,14 @@ test("delegated events quickIs", function() {
markup
.
find
(
"b"
).
attr
(
"devo"
,
"NO"
);
markup
.
find
(
"b"
).
attr
(
"devo"
,
"NO"
);
check
(
"b"
,
"b|[devo='NO'] p|.D"
);
check
(
"b"
,
"b|[devo='NO'] p|.D"
);
markup
.
on
(
"blink"
,
".tricky"
,
function
()
{
ok
(
false
,
"triggered on wrong class name match"
);
})
.
find
(
"p"
)
.
attr
(
"class"
,
"tricky-match"
)
.
trigger
(
"blink"
);
markup
.
remove
();
markup
.
remove
();
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment