Open GoogleCodeExporter opened 9 years ago
In fact, this also fixes scrollfloater for elements with positive left margins
(because the calculated offset left position *already* takes into account the
left margin). The fix above also fixes this.
See it broken:
<!DOCTYPE html>
<html>
<head>
<style>
#floated {
margin-left: 300px;
background: #FFCC00;
}
</style>
</head>
<body>
<div id="floated">
I float.
</div>
<div id="main">
I don't float.
</div>
<script src="/static/js/closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.string');
goog.require('goog.ui.ScrollFloater');
</script>
<script>
var scrollfloater = new goog.ui.ScrollFloater();
scrollfloater.decorate(goog.dom.getElement('floated'));
goog.dom.getElement('main').innerHTML = goog.string.repeat('nom nom nom ', 1000);
</script>
</body>
</html>
Original comment by rodrigo.moraes
on 22 May 2012 at 10:47
Original issue reported on code.google.com by
rodrigo.moraes
on 21 May 2012 at 9:17