.inline { display: inline; }
.list-item { display: list-item; }
.hidden, .none { display: none; }
+
+#div-gh-2836 {
+ position: relative;
+ overflow: auto;
+ height: 100px;
+}
+#div-gh-2836 div {
+ position: relative;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+}
"coordinates are modified (got offset.top: " + offsetTop + ")" );
} );
+QUnit.test( "outside view position (gh-2836)", function( assert ) {
+
+ // This test ported from gh-2836 example
+ assert.expect( 1 );
+
+ var parent,
+ html = [
+ "<div id=div-gh-2836>",
+ "<div></div>",
+ "<div></div>",
+ "<div></div>",
+ "<div></div>",
+ "<div></div>",
+ "</div>"
+ ].join( "" ),
+ stop = assert.async();
+
+ parent = $( html );
+ parent.appendTo( "#qunit-fixture" );
+
+ parent.one( "scroll", function() {
+ var pos = parent.find( "div" ).eq( 3 ).position();
+
+ assert.strictEqual(pos.top, -100);
+ stop();
+ });
+
+ parent.scrollTop( 400 );
+} );
+
} )();