Selector out of sync with row in specific case
Hi Alex,
I just came across an odd bug.
It took me some time to extract the minimal lines of code to cause the problem from the application I have coded.
With the code below and using FireFox 3.5.1 (doesn't happen in IE8, opera and safari), following the steps below puts the selector and rows out of sync.
That is, the selector for another row is shown next to the current row, etc.
The steps are:
1. Load the document in the browser
2. Click on the cell in column 0, row 1
3. Scroll down using the mouse wheel or press page down so that row 1 is not visible (doesn't seem to happen when scrolling by clicking on the scrollbar)
4. All the above steps must be done within 5 seconds before the window.setTimeout code runs (increase the timeout if you need more time)
5. Once the window.setTimeout code runs, the selector image for row 1 shows up in the selector position for the first visible row
I tried to check it with older versions of AW and it seems to happen in version 2.5.1 too.
It doesn't happen in version 2.0.1 - so, its not a recently introduced bug.
The steps are a little difficult to follow.
Please see the video of the problem at http://www.motreja.com/ankur/aw/aw_bug.html
I use the mouse wheel to scroll down in the video, but the same happens if you press page down.
Any workaround or fix ?
Thanks,
Ankur
I just came across an odd bug.
It took me some time to extract the minimal lines of code to cause the problem from the application I have coded.
With the code below and using FireFox 3.5.1 (doesn't happen in IE8, opera and safari), following the steps below puts the selector and rows out of sync.
That is, the selector for another row is shown next to the current row, etc.
The steps are:
1. Load the document in the browser
2. Click on the cell in column 0, row 1
3. Scroll down using the mouse wheel or press page down so that row 1 is not visible (doesn't seem to happen when scrolling by clicking on the scrollbar)
4. All the above steps must be done within 5 seconds before the window.setTimeout code runs (increase the timeout if you need more time)
5. Once the window.setTimeout code runs, the selector image for row 1 shows up in the selector position for the first visible row
I tried to check it with older versions of AW and it seems to happen in version 2.5.1 too.
It doesn't happen in version 2.0.1 - so, its not a recently introduced bug.
The steps are a little difficult to follow.
Please see the video of the problem at http://www.motreja.com/ankur/aw/aw_bug.html
I use the mouse wheel to scroll down in the video, but the same happens if you press page down.
Any workaround or fix ?
Thanks,
Ankur
<html>
<head>
<script src="runtime/lib/aw.js" type="text/javascript"></script>
<link href="runtime/styles/system/aw.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText(["header1", "header2", "header3", "header4", "header5", "header6", "header7", "header8", "header9", "header10"], 0);
obj.setCellTemplate(new AW.Templates.ImageText);
obj.setSelectorVisible(true);
obj.setVirtualMode(false);
obj.setColumnCount(10);
obj.setRowCount(40);
document.write(obj);
window.setTimeout(function() {
obj.setSelectorImage("home", 1);
obj.getSelectorTemplate(1).refresh();
obj.setCellImage("home", 1, 1);
obj.getRowTemplate(1).refresh();
document.getElementById("status").innerHTML = "done";
}, 5000);
</script>
<br><br>Status: <span id="status"></span>
</body>
</html>
Ankur Motreja
July 26,