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

Bug 39459

Summary: [content assist] Content assist gains focus when "activation follows mouse" is enabled (via TweakUI extension)
Product: [Eclipse Project] JDT Reporter: Peter Monks <pmonks>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: acosta, hanys, jhecking, mikewse
Version: 2.1   
Target Milestone: 3.2 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Peter Monks CLA 2003-06-30 00:11:07 EDT
Popup tooltips gain the focus when the "activation follows mouse" setting of 
the "TweakUI" Windows extension is enabled.  This means that any keystrokes 
intended for the underlying window are captured by the tooltip window and 
ignored.

This is particularly troublesome when source tooltips are set to automatically 
appear while editing source code - keystrokes will be swallowed by the tooltop 
window until the window is removed (my moving the mouse or hitting esc or what-
have-you).
Comment 1 JanT CLA 2003-09-29 10:08:13 EDT
I've experienced exactly the same problem except that i haven't activated 
the "activation follows mouse" option!
Comment 2 Dani Megert CLA 2003-09-29 11:01:03 EDT
Regarding comment 0: I tried to reproduce using I20030925 on Windows XP but was
not able to do so: you cannot give the focus to the tooltip window: it closes
automatically. Maybe you changed some other settings? Can you retry using
I20030925 or newer.

Regarding comment 1: Can you provide steps to reproduce using I20030925. It
would even be better to open a separate PR since this one is about "activation
follows mouse" being enabled which it is not in your case.
Comment 3 Peter Monks CLA 2003-09-29 13:27:51 EDT
Re "Regarding <A HREF="#c0">comment 0</A>": with the 3.0 I20030925 on Win2K 
SP4, I no longer see this behaviour if the mouse pointer is located outside the 
popup window at the time the window appears.  If, however, the mouse pointer 
happens to be located where the popup window appears, then at the time it 
appears the popup window immediately gains the focus and all further keystrokes 
are captured by it.

On the other hand, if I turn off the "Activation follows mouse" setting in 
TweakUI, the popup window does not gain the focus no matter where the mouse 
pointer is located - I have to (single) click on the popup window to get it to 
gain the focus.

FWIW I believe this behaviour should be consistent in both cases, since it's 
rare that a user would want focus to be assigned to the popup window.  IMVHO, 
making assignment of focus to the popup window explicit (by requiring a single 
mouse click) makes perfect sense, regardless of the value of the "activiation 
follows mouse" setting.

As for <A HREF="#c1">comment 1</A>, I'll let <a 
href="mailto:jan.tsch@aon.at">JanT</a> answer that one - I haven't observed 
that behaviour myself (since I always have the "activation follows mouse" 
setting turned on).
Comment 4 Peter Monks CLA 2003-09-29 13:28:45 EDT
grrr...damn Bugzilla escaping my HTML!  ;-)
Comment 5 Dani Megert CLA 2003-09-30 05:08:15 EDT
There are two kinds of popups:

- the ones that come when you hover: they should never get the focus or take
input in the first place

- the ones that come when you press F2: they have a border and get the focus

I could not reproduce the problem described in comment 0.

>If, however, the mouse pointer 
>happens to be located where the popup window appears
Can you provide the steps of what you are exactly doing?

Comment 6 Peter Monks CLA 2003-09-30 12:17:22 EDT
So just to reiterate my previous post, this is the first kind of popup (it 
appears automatically).

To reproduce this problem:
1. Create a new class file with a "public static void Main" method
2. Open a blank line in the body of that method
3. Locate the mouse one line below the new blank line, and 16 character spaces 
across from the end of the new blank line (where Eclipse has auto-indented to)
4. Type the following text: "System.out." (note the final full stop character)
5. Pause
6. Popup code completion window automatically appears under current mouse 
cursor position, and as a result gains focus automatically

At this point if you type anything but "Esc", the popup window captures the 
keystrokes and swallows them.
Comment 7 Dani Megert CLA 2003-09-30 12:51:24 EDT
Ok, so you are actually talking about content assist and not the tool tips (for
us a tool tip is the hover info which appears when you hover over something with
the mouse).
Comment 8 Peter Monks CLA 2003-09-30 12:55:55 EDT
Yeah sorry for the confusion.  I'm still not up to speed with my Eclipse 
terminology!  ;-)
Comment 9 Dani Megert CLA 2004-04-26 04:50:37 EDT
*** Bug 59879 has been marked as a duplicate of this bug. ***
Comment 10 Mike Han CLA 2004-04-26 05:09:39 EDT
Guys, I think it's the problem with the Code Assist. For my case, I am not 
using TweakUI and I am using Windows XP SP4. I see no reason that it should be 
related to the OS since previously I was able to work as normal, until until 
recently that I had upgraded to the 3.0 Build M8 version. I wouldn't be 
surprised if this bug also happen to appear on other builds.
Comment 11 Steve Northover CLA 2004-05-14 13:08:44 EDT
*** Bug 62224 has been marked as a duplicate of this bug. ***
Comment 12 Steve Northover CLA 2004-05-14 13:10:22 EDT
Not a duplicate.  Ignore last message.
Comment 13 Tom Hofmann CLA 2004-06-21 06:01:05 EDT
*** Bug 57311 has been marked as a duplicate of this bug. ***
Comment 14 Tom Hofmann CLA 2004-06-21 06:02:21 EDT
changing OS to 'All' as the same problem exists on Linux/GTK if focus behaviour
is set to "focus follows mouse" or similar.
Comment 15 Dani Megert CLA 2004-06-21 06:23:36 EDT
Adapted summary to reflect the problem (see comment 7 and comment 8).
Comment 16 Dani Megert CLA 2005-08-25 11:55:12 EDT
This has been fixed (see bug 62224).