Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 385716 - Scroll position jumps in editor after hyperlinked opening when using scroll wheel
Summary: Scroll position jumps in editor after hyperlinked opening when using scroll w...
Status: CLOSED DUPLICATE of bug 375576
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: Macintosh Mac OS X
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-23 08:22 EDT by Martijn Dashorst CLA
Modified: 2012-08-08 19:47 EDT (History)
4 users (show)

See Also:


Attachments
Quicktime movie showing the behavior described (247.70 KB, video/quicktime)
2012-07-23 08:23 EDT, Martijn Dashorst CLA
no flags Details
Scroll bar at the top but caret in the middle of the file (109.38 KB, image/png)
2012-08-01 09:04 EDT, Pascal Gélinas CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martijn Dashorst CLA 2012-07-23 08:22:24 EDT
Build Identifier: 20120614-1722

when I double click on a error and the file opens up with the error at the caret postion,
when I scroll using the mouse wheel,
the view position jumps to the top of the file.


Reproducible: Always

Steps to Reproduce:
1. open a file using a hyperlinked position (error, search result)
2. scroll up with the scroll wheel on your mouse
3. see the position jump to the top of the document
Comment 1 Martijn Dashorst CLA 2012-07-23 08:23:47 EDT
Created attachment 219044 [details]
Quicktime movie showing the behavior described

This video opens a file using a double click on an error in the task view. Then I use the scroll wheel to scroll up. The view position jumps to the top of the document.
Comment 2 Pascal Gélinas CLA 2012-08-01 09:02:40 EDT
I got the same problem. Whenever I do an action that opens up a new editor (like a Java editor when using the problem view, open declaration, call hierarchy, etc.) and places the caret somewhere in the file, the scroll bar does not "follow". If the caret is in the middle of the file, then the scroll bar should be in the middle of its area too, but it's not the case; it's always at the top. So when I scroll using the mouse wheel or the scroll bar, the view in the editor jumps to the beginning of the file.

However, if the editor was already open and the action merely brings the editor to the top, then everything works fine.

I'm using Eclipse 4.2 under Ubuntu 11.04.
Comment 3 Pascal Gélinas CLA 2012-08-01 09:04:23 EDT
Created attachment 219437 [details]
Scroll bar at the top but caret in the middle of the file

A screenshot that shows the bug: the caret is at the line 107 but the scroll bar is at the top of its area.
Comment 4 KARASZI István CLA 2012-08-06 04:40:34 EDT
Same problem here on Mac OS X (10.7.4), Eclipse (Juno 20120614-1722)
Comment 5 Markus Keller CLA 2012-08-08 12:12:58 EDT
I cannot reproduce this on Mac OS X 10.6.8, but it could very well be specific to Lion or Ubuntu with their non-persistent scroll bars.

Maybe it's also fallout from bug 375576 and disappears when that bug is fixed.
Comment 6 Pascal Gélinas CLA 2012-08-08 12:35:02 EDT
In fact, this should be closed as a duplicate of 383820, which is exactly the behaviour I'm experiencing. And that bug has been marked as a duplicate of 375576 by Dani Megert, so you're probably right.
Comment 7 Markus Keller CLA 2012-08-08 19:47:34 EDT
Reproduced with 4.2 on Mac OS X 10.7.4.  Does not happen with 3.8.

*** This bug has been marked as a duplicate of bug 375576 ***