
|
If you were logged in you would be able to see more operations.
|
|
|
Flex SDK
Created: 05/14/08 02:47 PM
Updated: 06/24/08 07:34 PM
|
|
| Component/s: |
mx: DataGrid
|
|
Security Level:
|
Public
(All JIRA Users
)
|
|
| Severity: |
Crash/Hang
|
| Reproducibility: |
Every Time
|
| Discoverability: |
Medium
|
| Found in Version: |
SDK Flex 3 (Released)
|
| Affected OS(s): |
Windows
- All Windows
|
| Steps to Reproduce: |
Attached is a simple app that will demonstrate the issue
Steps to reproduce with example:
When you run the example, there should be a horizontal scrollbar at the bottom of the table.
Click on a cell in the middle of the table.
Press the tab key to advance to the next cell.
When you get to a point where you are tabbing to a cell that requires the horizontal scrollbar to shift, the infinite loop occurs.
If the bug were not present, you should be able to continue tabbing to the end of the row and then continue tabbing through cells in the next row.
I believe I have discovered a fix for this issue within the Flex DataGrid.as file, however, it is in a private method.
I was able to try out the fix by creating copies of DataGrid.as, DataGridItemRenderer.as and DataGridHeader.as, giving them new names and updating references.
Here is the proposed fix in DataGrid.as. It is in the scrollToEditedItem method:
<original code>
:
while (colIndex > lastColIndex ||
(colIndex == lastColIndex && colIndex > horizontalScrollPosition + lockedColumnCount &&
partialCol))
{
if (horizontalScrollPosition == maxHorizontalScrollPosition)
break;
horizontalScrollPosition = Math.min(horizontalScrollPosition + (colIndex > lastColIndex ? colIndex - lastColIndex : partialCol), maxHorizontalScrollPosition);
len = (listItems && listItems[0]) ? listItems[0].length : visibleColumns.length;
lastColIndex = horizontalScrollPosition + len - 1 + lockedColumnCount;
partialCol = (listItems[0][len - 1].x + listItems[0][len - 1].width > listContent.width) ? 1 : 0;
}
:
<code with fix>
:
var horzScrollPos:Number = horizontalScrollPosition;
while (colIndex > lastColIndex ||
(colIndex == lastColIndex && colIndex > horizontalScrollPosition + lockedColumnCount &&
partialCol))
{
if (horzScrollPos == maxHorizontalScrollPosition)
break;
horzScrollPos = Math.min(horzScrollPos + (colIndex > lastColIndex ? colIndex - lastColIndex : partialCol), maxHorizontalScrollPosition);
len = (listItems && listItems[0]) ? listItems[0].length : visibleColumns.length;
lastColIndex = horzScrollPos + len - 1 + lockedColumnCount;
partialCol = (listItems[0][len - 1].x + listItems[0][len - 1].width > listContent.width) ? 1 : 0;
}
horizontalScrollPosition = horzScrollPos;
Attached is a simple app that will demonstrate the issue
Steps to reproduce with example:
When you run the example, there should be a horizontal scrollbar at the bottom of the table.
Click on a cell in the middle of the table.
Press the tab key to advance to the next cell.
When you get to a point where you are tabbing to a cell that requires the horizontal scrollbar to shift, the infinite loop occurs.
If the bug were not present, you should be able to continue tabbing to the end of the row and then continue tabbing through cells in the next row.
I believe I have discovered a fix for this issue within the Flex DataGrid.as file, however, it is in a private method.
I was able to try out the fix by creating copies of DataGrid.as, DataGridItemRenderer.as and DataGridHeader.as, giving them new names and updating references.
Here is the proposed fix in DataGrid.as. It is in the scrollToEditedItem method:
<original code>
:
while (colIndex > lastColIndex ||
(colIndex == lastColIndex && colIndex > horizontalScrollPosition + lockedColumnCount &&
partialCol))
{
if (horizontalScrollPosition == maxHorizontalScrollPosition)
break;
horizontalScrollPosition = Math.min(horizontalScrollPosition + (colIndex > lastColIndex ? colIndex - lastColIndex : partialCol), maxHorizontalScrollPosition);
len = (listItems && listItems[0]) ? listItems[0].length : visibleColumns.length;
lastColIndex = horizontalScrollPosition + len - 1 + lockedColumnCount;
partialCol = (listItems[0][len - 1].x + listItems[0][len - 1].width > listContent.width) ? 1 : 0;
}
:
<code with fix>
:
var horzScrollPos:Number = horizontalScrollPosition;
while (colIndex > lastColIndex ||
(colIndex == lastColIndex && colIndex > horizontalScrollPosition + lockedColumnCount &&
partialCol))
{
if (horzScrollPos == maxHorizontalScrollPosition)
break;
horzScrollPos = Math.min(horzScrollPos + (colIndex > lastColIndex ? colIndex - lastColIndex : partialCol), maxHorizontalScrollPosition);
len = (listItems && listItems[0]) ? listItems[0].length : visibleColumns.length;
lastColIndex = horzScrollPos + len - 1 + lockedColumnCount;
partialCol = (listItems[0][len - 1].x + listItems[0][len - 1].width > listContent.width) ? 1 : 0;
}
horizontalScrollPosition = horzScrollPos;
|
| Language Found: |
English
|
| Bugbase Id: |
none
|
| Triaged: |
Yes
|
| Regression: |
No
|
| QA Owner: |
Robert Vollmar
|
| Participants: |
Carlos Molina and Robert Vollmar
|
| Browser: |
Internet Explorer 7.x
|
|
All
|
Comments
|
|
Sort Order:
|
|
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at mx.core::UITextField/set ignorePadding()
at mx.controls.dataGridClasses::DataGridItemRenderer()
at mx.core::ClassFactory/newInstance()
at mx.core::ContextualClassFactory/newInstance()
at mx.controls.dataGridClasses::DataGridBase/createColumnItemRenderer()
at mx.controls.dataGridClasses::DataGridHeader/updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.managers::LayoutManager/validateClient()
at mx.core::UIComponent/validateNow()
at mx.controls::DataGrid/set horizontalScrollPosition()
at mx.controls::DataGrid/scrollToEditedItem()
at mx.controls::DataGrid/commitEditedItemPosition()
at mx.controls::DataGrid/updateDisplayList()
at mx.controls.listClasses::ListBase/validateDisplayList()
at mx.managers::LayoutManager/validateDisplayList()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()