Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364802

Summary: [TableViewer] Cell editor misplaced when activated on a partially visible row
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.5 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Rüdiger Herrmann CLA 2011-11-25 05:19:14 EST
With bug 364739 fixed, there is another issue when activating a cell editor on the bottom most row if it is partially visible. The cell editor is positioned directly *below* the row where it should appear.

To reproduce, 
* import the project from attachment 207492 [details]  from bug 364739 (table-bug.zip)
* run the TableEntryPoint as an RWT application
* resize the Shell so that the botom-most row is only partially visible
* click into the Description cell to edit it
-> all rows are shifted up by one row, but the text widget (cell editor) is positioned where the row-to-be-edited was just before activating the cell editor.
Again this is reproducible in all browsers. In RCP/SWT, this works as expected: the partially visible row is scrolled into (full) view and the editor is placed at the new position.
Comment 1 Rüdiger Herrmann CLA 2011-11-25 15:49:05 EST
Created attachment 207559 [details]
Proposed fix

When resize() is called, this patch adds a phase-listener that forces a re-layout after all events have been processed (after-phase-listener for PROCESS_ACTION)
This emulates the behavior from SWT (which uses timerExec) and ensures that the editor is positioned on the correct row.
Comment 2 Rüdiger Herrmann CLA 2011-11-28 13:20:49 EST
Applied patch to v14_Tree_Table_Merge branch
Comment 3 Rüdiger Herrmann CLA 2011-11-28 13:35:02 EST
Applied proposed fix to CVS HEAD.