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

Bug 400115

Summary: Next Annotation popup disappears if it caused the editor to scroll [chrome]
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: EditorAssignee: Silenio Quarti <Silenio_Quarti>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Silenio_Quarti
Version: 2.0   
Target Milestone: 3.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
fix Silenio_Quarti: review-

Description Mark Macdonald CLA 2013-02-06 10:31:06 EST
Chrome 25

1. Open a large JS file that has some annotations in it
2. Position the editing caret such that going to the next annotation will require the editor to scroll.
3. Press Ctrl+. (Next Annotation)
4. It goes to the next annotation, but the popup that's supposed to show the annotation text only appears for a fraction of a second, then vanishes.

Firefox doesn't have this problem
Comment 1 Silenio Quarti CLA 2013-02-08 15:30:29 EST
Created attachment 226798 [details]
fix

This patch fixes the problem.
Comment 2 Silenio Quarti CLA 2013-02-28 14:53:19 EST
The patch attached above still relied on timing behavior. The problem only happens on Chrome because it is sending a mouse move event to the text view when it scrolls. The mouse move handler in editor.js was setting the tooltip target to a different location (offset under pointer) and it run after the key binding action showed the tooltip for the next/previous annotation.  The fix below detects that the mouse location has not changed and does not change the tooltip target in that case.

The patch also rewrites the next and previous action in order to share code and it removes the setTimeout call that is not necessary anymore in any browser. The setTimeout was trying to solve similar problem on Firefox.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=bcadbf19c47bcab461695e3beb6fba8d0f316aaf