newTableView insertRow scrollHeight bug

Hey there,

I noticed that by inserting a new row, the tableView becomes scrollable, even when the contents height is not large enough to exceed the limits.

e.g.: Means that if you have a tableview with a height of 300px and there are only two rows each height 30px tall, and you insert a third one, you are suddenly able to scroll out of the boundaries.

well I think the problem is that the following code adds a new row height to _scrollHeight, even if this got set to the full tableView._height in case that it’s smaller then this ( Line 496 / enterFrame Method ).

Following line in function view:_insertRow( options, reRender ):

self.\_scrollHeight = self.\_scrollHeight + self.\_rows[table.maxn(self.\_rows)].\_height + 1

replaced by this

self.\_scrollHeight = ( #self.\_rows + 1 ) \* ( self.\_rows[#self.\_rows].\_height + 1 )

fixes the bug, but it still does something weird with the scrollBar itself.

please take a look.

thanks,

roman

Hi Roman.  Thank you for tracking this down.  Can you provide a bug report on this?  Include the above information.  The engineers will appreciate the work you’ve done to track it down.

They are currently working on Widget fixes and now would be a good time to get them this information.  Please post the bug report number back here.

Thanks

Rob

well I think the problem is that the following code adds a new row height to _scrollHeight, even if this got set to the full tableView._height in case that it’s smaller then this ( Line 496 / enterFrame Method ).

Following line in function view:_insertRow( options, reRender ):

self.\_scrollHeight = self.\_scrollHeight + self.\_rows[table.maxn(self.\_rows)].\_height + 1

replaced by this

self.\_scrollHeight = ( #self.\_rows + 1 ) \* ( self.\_rows[#self.\_rows].\_height + 1 )

fixes the bug, but it still does something weird with the scrollBar itself.

please take a look.

thanks,

roman

Hi Roman.  Thank you for tracking this down.  Can you provide a bug report on this?  Include the above information.  The engineers will appreciate the work you’ve done to track it down.

They are currently working on Widget fixes and now would be a good time to get them this information.  Please post the bug report number back here.

Thanks

Rob