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
2c14b00a
Commit
2c14b00a
authored
Dec 21, 2014
by
Aditya Raghavan
Committed by
Oleg Gaidarenko
Dec 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Event: add test for window scrollTop/Left logic in iframes
Ref d21edb599d8f5f80a3f3ecba5b62311b9cd1a3e6
parent
6bc0e508
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
offset.js
test/unit/offset.js
+15
-0
No files found.
test/unit/offset.js
View file @
2c14b00a
...
@@ -547,4 +547,19 @@ test("fractions (see #7730 and #7885)", function() {
...
@@ -547,4 +547,19 @@ test("fractions (see #7730 and #7885)", function() {
div
.
remove
();
div
.
remove
();
});
});
test
(
"iframe scrollTop/Left (see gh-1945)"
,
function
()
{
expect
(
2
);
// Tests scrollTop/Left with iframes
var
ifDoc
=
jQuery
(
"#iframe"
)[
0
].
contentDocument
;
jQuery
(
"#iframe"
).
css
(
"width"
,
"50px"
).
css
(
"height"
,
"50px"
);
ifDoc
.
write
(
"<div style='width: 1000px; height: 1000px;'></div>"
);
jQuery
(
ifDoc
).
scrollTop
(
200
);
jQuery
(
ifDoc
).
scrollLeft
(
500
);
equal
(
jQuery
(
ifDoc
).
scrollTop
(),
200
,
"$($('#iframe')[0].contentDocument).scrollTop()"
);
equal
(
jQuery
(
ifDoc
).
scrollLeft
(),
500
,
"$($('#iframe')[0].contentDocument).scrollLeft()"
);
});
})();
})();
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