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

Bug 389432

Summary: Scrollpanel keeps scrolling to top
Product: [Eclipse Project] Platform Reporter: Jamie Strachan <frostfreek>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: bsd, ericwill, ezelspinguin, frostfreek, h.klene, mail, martin.fleurke, pwebster, stephan.herrmann, tparker
Version: 4.3Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Jamie Strachan CLA 2012-09-12 12:51:45 EDT
There are two situations I have found so far, where the a scrolled panel keeps returning to the top, in Juno.

A. The Keys dialog

  1 Open up window/Prefereneces
  2 Select "General/Keys"
  3 Scroll down to the middle of the list
  4 Click on an item in the list
Poof, the scrollbar jumps back to the top.
The selected item is actually selected, but it is scrolled out of view.
You can still use the arrow keys to move up and down, to select the next or previous row in the list, and the scrolled list momentarily shows the newly selected item, but then immediately jumps back to the top.

Workaround: use the mouse to scroll the list, and then remember what you've chosen.

B. Autocomplete

1. Open up a java file, and go into a method.
2. on a new line, type "java." and wait for the auto-complete listbox to open.
3. Scroll down the autocomplete list, by tapping the down arrow key
4. As you scroll down, the list will start to freak out, and the scroll bar will start jumping around, meaning you cannot always see the current selection.
5. Sometimes, the list pop straight back up to the top, meaning for long lists, you can't actually get to the bottom of the list without using the mouse.

Workaround: Use the mouse to scroll the listbox and select an item.
Comment 1 Jamie Strachan CLA 2012-09-12 12:52:50 EDT
Oops, in situation A above, I meant:

3. Using the mouse, scroll down to the middle of the list
Comment 2 Brian de Alwis CLA 2012-10-02 14:02:42 EDT
I've seen this too on Linux/GTK: it happens with the CSS Spy too.  It appears to be related to tables with column editors.  I haven't been able to trace it further to see if it's a problem with JFace or SWT's editing support.
Comment 3 Brian de Alwis CLA 2012-10-15 15:35:57 EDT
Also happens with the Window list (Ctrl-E) when there are a lot of entries.
Comment 4 pjv pjv CLA 2012-12-02 17:43:10 EST
This bug report so far doesn't make it clear just how blocking this bug is for a normal workflow. The OP also hints that using the mouse is a valid workaround, but it's rather the other way around.

I'm experiencing this too since 4.2:
Version: 4.2.1
Build id: M20120914-1800
Mint Linux 14
I'm using the Cinnamon desktop.

C.
As Brian said, this occurs with the Window List (Ctrl-E). When coding, frequently, you want to bring a hidden file editor to the front, but this common behavior that should be quick is now very much slowed down. 
1. Have many .java files open in the editor (>99).
2. Click the overflow button (or Ctrl-E) to open the full list. The scrollbar is at the top.
3. Use mousewheel scrolling and scroll more than a few 'pages' down (to the second half or so). So far so good.
4. Notice how the selector doesn't follow along, until you move your mouse pointer. The row it's hovering above gets selected but instantaneously the selection and page view jumps back to almost the beginning (maybe the second page or so). This jumping-back is unexpected and makes it hard to select files beyond the second page.
5. Notice that as you move your mouse pointer closer to the top of your screen, the list scrolls back further, making it even more impossible to hit your target.

Similar experience when scrolling with the mouse by using the scrollbar.

The workaround is to open the list, not touch the mouse, and navigate with the cursor keys. Or to type in the first letters of the file you're searching for (which may be hard because the first letters are often the same).

A.
For me the only workaround is to use the keyboard. Mouse scrollbar dragging or mousewheel scrolling are too obstructed.

B.
For me this is only apparent if you scroll far enough down, and the screen starts flashing.
Comment 5 pjv pjv CLA 2012-12-02 17:48:05 EST
And I forgot what is likely the worst:

I see this in the Java editor too. When I click an element in the Outline, which is well down, the editor opens but not at the location of the element. Or it opens, puts the element nicely at the top of the window, but then the scrollbar shows there is no code above it. If you scroll down a bit inside the editor, suddenly you jump to a different position in the editor and the scrollbar lets you reach all parts again.

Since this involves scrolling, I'm assuming it is related.
Comment 6 Brian de Alwis CLA 2012-12-03 17:43:02 EST
*** Bug 395343 has been marked as a duplicate of this bug. ***
Comment 7 Toshihiro Izumi CLA 2012-12-04 02:52:14 EST
I can reproduce this problem on LinuxMint14(32bit) with
 Eclipse 4.2.1 M20120914-1800(Juno SR1/Latest Release)
but cannot with
 Eclipse 4.2.1 M20121128-1200(4.2 Maintenance Build)
I believe it was fixed already.
Comment 8 Paul Webster CLA 2012-12-10 09:46:16 EST
*** Bug 388768 has been marked as a duplicate of this bug. ***
Comment 9 Paul Webster CLA 2012-12-10 09:46:37 EST
*** Bug 370079 has been marked as a duplicate of this bug. ***
Comment 10 Paul Webster CLA 2012-12-10 09:46:54 EST
*** Bug 376474 has been marked as a duplicate of this bug. ***
Comment 11 Stephan Herrmann CLA 2012-12-10 19:38:07 EST
For the records: in bug 370079 I had narrowed down some of the Ctrl-E weirdness to having been introduced somewhere between 3.8M3 and 3.8M4.
Comment 12 Brian de Alwis CLA 2013-02-15 10:05:47 EST
FWIW: I don't see this in 4.3M5
Comment 13 Stephan Herrmann CLA 2013-02-15 12:39:14 EST
I retried all regressions from duplicate bug 370079 and also here: all looks good (I used I20130108-0800).

It would for sure be comforting to know which fix fixed the problems (after the breakage has been narrowed down to between 3.8M3 and 3.8M4), but other than that I wouldn't mind if this bug is closed as is.
Comment 14 Holger Klene CLA 2013-02-16 04:14:03 EST
Now that I tried to reproduce it, this scrolling bug also vanished for me.

Eclipse 4.3M3 I20121031-2000
Oracle jdk1.7.0_09

I had not much time recently to play with current milestones of eclipse or even updating my jdk on this machine. Instead I got an update to Kubuntu 12.10 Quantal Quetzal meanwhile. So I suggest, this was not really an SWT/Java issue but rather a bug in the underlying native GUI components?
Comment 15 Terry Parker CLA 2015-02-19 18:40:22 EST
(In reply to Holger Klene from comment #14)
> Now that I tried to reproduce it, this scrolling bug also vanished for me.
> 
> Eclipse 4.3M3 I20121031-2000
> Oracle jdk1.7.0_09
> 
> I had not much time recently to play with current milestones of eclipse or
> even updating my jdk on this machine. Instead I got an update to Kubuntu
> 12.10 Quantal Quetzal meanwhile. So I suggest, this was not really an
> SWT/Java issue but rather a bug in the underlying native GUI components?

I have not seen this in the 4.4 release. Is anyone going to be able to do the analysis to determine how it was fixed, or should the bug just be marked as closed?
Comment 16 Eric Williams CLA 2018-05-15 17:13:59 EDT
(In reply to Terry Parker from comment #15)
> I have not seen this in the 4.4 release. Is anyone going to be able to do
> the analysis to determine how it was fixed, or should the bug just be marked
> as closed?

Let's close it.