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
6d2c5c71
Commit
6d2c5c71
authored
Sep 11, 2013
by
Timmy Willison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct the checkClone support test for Safari 5.1 and mobile webkits
parent
8a832797
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
support.js
src/manipulation/support.js
+11
-14
No files found.
src/manipulation/support.js
View file @
6d2c5c71
...
@@ -3,26 +3,23 @@ define([
...
@@ -3,26 +3,23 @@ define([
],
function
(
support
){
],
function
(
support
){
(
function
()
{
(
function
()
{
var
input
=
document
.
createElement
(
"input"
),
var
input
,
fragment
=
document
.
createDocumentFragment
();
fragment
=
document
.
createDocumentFragment
(),
div
=
fragment
.
appendChild
(
document
.
createElement
(
"div"
)
);
input
.
type
=
"checkbox"
;
// #11217 - WebKit loses check when the name is after the checked attribute
div
.
innerHTML
=
"<input type='radio' checked name='t'/>"
;
// Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
// old WebKit doesn't clone checked state correctly in fragments
support
.
checkClone
=
div
.
cloneNode
(
true
).
cloneNode
(
true
).
lastChild
.
checked
;
// Make sure checked status is properly cloned
// Make sure checked status is properly cloned
// Support: IE9, IE10
// Support: IE9, IE10
input
=
document
.
createElement
(
"input"
);
input
.
type
=
"checkbox"
;
input
.
checked
=
true
;
input
.
checked
=
true
;
support
.
noCloneChecked
=
input
.
cloneNode
(
true
).
checked
;
support
.
noCloneChecked
=
input
.
cloneNode
(
true
).
checked
;
// #11217 - WebKit loses check when the name is after the checked attribute
input
.
checked
=
false
;
input
.
setAttribute
(
"checked"
,
"t"
);
input
.
setAttribute
(
"name"
,
"t"
);
fragment
.
appendChild
(
input
);
// Support: iOS 5.1, Android 4.x, Android 2.3
// old WebKit doesn't clone checked state correctly in fragments
support
.
checkClone
=
fragment
.
cloneNode
(
true
).
cloneNode
(
true
).
lastChild
.
checked
;
})();
})();
return
support
;
return
support
;
...
...
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