#10504 closed defect (duplicate)
[patch][cla] Grid: Focus manager throws exception when updating structure
Reported by: | avoidscorn | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.4.0 |
Keywords: | Cc: | Evan | |
Blocked By: | Blocking: |
Description
In certain situations, dojox.grid._FocusManager
keeps a reference to a destroyed view, causing it to throw an exception when it tries to focus the view's header nodes.
The following steps reproduce this bug:
- Ensure that the grid has enough rows to require a scrollbar. This ensures that the focus manager's
focusView
attribute is set. - Change the grid's query such that the grid no longer needs a scrollbar. This is necessary to ensure that
dojox.grid._ViewManager.getFirstScrollingView
returns null. - Set the grid's
structure
attribute (it does not matter what the new structure is). Due to the logic indojox.grid._FocusManager.initFocusView
, thefocusView
attribute will still reference the old, destroyed view, because there is no other scrolling view to use instead. - The focus manager causes a "node is undefined" exception to be thrown in its
_isHeaderHidden
method, because its view'sheaderNode
is undefined at this point.
The attached patch changes initFocusView
to check if its existing focusView
is destroyed before reusing it. I'm not sure if this is the best place to handle it, but it works for me.
Attachments (1)
Change History (7)
Changed 11 years ago by
comment:1 Changed 11 years ago by
Owner: | Nathan Toone deleted |
---|
comment:2 Changed 11 years ago by
This ticket no longer has an owner - can this patch be committed?
The problem fixed is still present in 1.5.
comment:3 Changed 11 years ago by
Cc: | evan added |
---|---|
Owner: | set to bryanforbes |
bryan/evan, can you take a look at this?
comment:4 Changed 10 years ago by
Owner: | changed from bryanforbes to Bryan Forbes |
---|
comment:5 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:6 Changed 10 years ago by
Cc: | Evan added; evan removed |
---|
Note: See
TracTickets for help on using
tickets.
Unassigning my tickets.