Blog  |   Sitemap  |   Search  |   Language:  eng рус
Home
JavaScript UI FrameworkMostbet AzerbaycanBug TrackerBug details

Bug Data

ID: #0211
Status: Fixed
Severity: Normal
Reporter: 1ton
Submitted: 11-06-10 20:21

Product Data

Product: Ample SDK
Component: DOM Core
Version: 0.9.x
OS: > Any
Browser: Firefox 2.x

Description

getBoundingClientRect().top is wrong in some cases

Here is a test-case:

<body>
<script type="application/ample+xml" xmlns="http://www.w3.org/1999/xhtml">
<a href="javascript:void(0)" onclick="alert(ample.getElementById('test').getBoundingClientRect().top)">test getBoundingClientRect().top</a>
<div style="overflow: scroll; height: 140px; border: 1px solid blue;">
<div style="height: 100px; border: 1px solid red;"></div>
<div style="height: 100px; border: 1px solid red; background: yellow;" id="test"></div>
<div style="height: 100px; border: 1px solid red;"></div>
<div style="height: 100px; border: 1px solid red;"></div>
</div>

</script>
<script type="text/javascript" src="ample/runtime.js"></script>
<script type="text/javascript" src="ample/languages/aml/aml.js"></script>
<script type="text/javascript" src="ample/languages/xhtml/xhtml.js"></script>
</body>

Scroll to the bottom and click the link.

For all browsers it will be -154.
For firefox <= 2.x it will be 130.

Messages written for this bug

No messages has been appended yet.

Add a message
BugTracker