Opened 11 years ago

Closed 11 years ago

#5730 closed defect (invalid)

Grid resize can fail if parent node doesn't exist in 1.0.2 (fix for 4892 is incorrect)

Reported by: guest Owned by: Bryan Forbes
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Nathan Toone)

While resizing my grids, I keep getting a "this.domNode has no properties" error from the VirtualGrid resize function.

The fix to ticket #4892 put the !this.domNode check too low down in the function, so it's after the line that checks !this.domNode.parentNode.

The if (!this.domNode) return; line added in changelist r11308 should be removed, and the if (!this.domNode.parentNode) at the start of the function should be changed to if (!this.domNode || !this.domNode.parentNode) return; to make sure this.domNode exists before trying to use it.

Change History (7)

comment:1 Changed 11 years ago by guest

There should be an "or" in the suggested "if" in between the this.domNode and this.domNode.parentNode. The editor ate the two vertical bar characters.

comment:2 Changed 11 years ago by Adam Peller

Description: modified (diff)

comment:3 Changed 11 years ago by Adam Peller

Description: modified (diff)

comment:4 Changed 11 years ago by dylan

Milestone: 1.1

comment:5 Changed 11 years ago by sorvell

Milestone: 1.11.2

The grid should always have a domNode so this should never happen. Adding a simple check here would be fine if it's really necessary, but we need to determine why it's necessary. (There is a check for the domNode existence that entirely aborts rendering.)

A test case showing how/when resize failed with this error would be extremely helpful.

comment:6 Changed 11 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

comment:7 Changed 11 years ago by Nathan Toone

Description: modified (diff)
Resolution: invalid
Status: newclosed

Closing as invalid - now that the grid doesn't actually render until startup is called, this issue should not be present anymore...startup shouldn't be called until the grid has been attached to the DOM.

If this issue still exists in recent nightlies, reopen with a test case and/or more information on how to reproduce.

Note: See TracTickets for help on using tickets.