Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366738 - [TableViewer] VIRTUAL tableviewer resets selection after cell-editing
Summary: [TableViewer] VIRTUAL tableviewer resets selection after cell-editing
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks: 366385
  Show dependency tree
 
Reported: 2011-12-14 13:14 EST by Rüdiger Herrmann CLA
Modified: 2020-01-28 16:45 EST (History)
2 users (show)

See Also:


Attachments
Snippet to reproduce the bug (6.91 KB, text/plain)
2011-12-14 13:19 EST, Rüdiger Herrmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-12-14 13:14:59 EST
Build Identifier: master

After cell-editing that spanned several rows, the table viewer resets the selection to the row where editing was started. This can be observed only with a TableViewer that is backed by a VIRTUAL table, with non-VIRTUAL tables the behavior is as expected.

Steps to Reproduce:
1. Run the attached TableViewerBug class
2. activate the cell editor in the fist row, first column
3. press Tab until you reach the 3rd row
4. press Esc to deactivate the cell editor
5. press the Down key
Expected result: row 4 gets selected
Actual result: row 2 gets selected

I suggest to change the selection-code in AbstractTableViewer#virtualSetSelectionToWidget() to be equivalent to the code from setSelectionToWidget(). There, doSetSelection() (instead of doSelect) is used to select items as this method also moves to focused item with the selection. The focused item in turn determines where keyboard navigation starts from.
Comment 1 Rüdiger Herrmann CLA 2011-12-14 13:19:59 EST
Created attachment 208398 [details]
Snippet to reproduce the bug
Comment 2 Matt Heitz CLA 2012-11-12 13:25:17 EST
*** Bug 358669 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2020-01-28 16:45:29 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.