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

Bug 361318

Summary: [find/replace] Editor Loses Focus when Console is detached and Find Window Displayed
Product: [Eclipse Project] Platform Reporter: Oz <oz_ko>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, eclipse.felipe, james, lshanmug, markus.kell.r, Silenio_Quarti
Version: 3.8   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: stalebug

Description Oz CLA 2011-10-18 21:15:17 EDT
Build Identifier: 3.6.2

The current editor will Lose Focus when the Console Window is Detached from the IDE (ie a floating window) and you: Launch the Find window (Apple-F), enter text to find, click Find text (or press Enter), dismiss Find window (press Esc). Focus is now set to the console so Find Again (Apple-K) without invoking the Find window will not execute on the current editor

Reproducible: Always

Steps to Reproduce:
1.Detach Console window
2.Open an editable File
3.Press Apple-F to launch the Find window
4.Enter some text to find and Press Enter
5.Press 'Esc' to close the Find window
6.Focus is now on the detached Console window, when it should return to the current editor
Comment 1 Dani Megert CLA 2011-10-19 04:33:42 EDT
> 1.Detach Console window
> 2.Open an editable File
> 3.Press Apple-F to launch the Find window

I *think* you did
1.Detach Console window
2. Press Apple-F to launch the Find window while the console has focus
3. Open an editable File

==> closing the Find/Replace dialog will switch to Console when closed, because it was opened from there.
Comment 2 Oz CLA 2011-10-19 05:09:33 EDT
No, the focus was on an editor window, not the console.
1) Detach Console
2) Open an editor window (make sure focus is on editor window)
3) Apple-F; Find any text
4) Press Escape (Closes Find Window)

Result: Focus is set to Console
Comment 3 Dani Megert CLA 2011-10-19 07:01:24 EDT
(In reply to comment #2)
> No, the focus was on an editor window, not the console.
OK. That would be wrong/unexpected.

> 1) Detach Console
> 2) Open an editor window (make sure focus is on editor window)
I assume it's in the window from where you detached the console? I tested with a plain text editor.

> 3) Apple-F; Find any text
Do you click the button with the mouse or are you using the keyboard?
Comment 4 Oz CLA 2011-10-19 07:43:53 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > No, the focus was on an editor window, not the console.
> OK. That would be wrong/unexpected.
> 
> > 1) Detach Console
> > 2) Open an editor window (make sure focus is on editor window)
> I assume it's in the window from where you detached the console? I tested with
> a plain text editor.
Yes, all other windows are attached. Only the console is detached. I've tried with different editors (java/text/xml) and same thing happens.

> > 3) Apple-F; Find any text
> Do you click the button with the mouse or are you using the keyboard?
I've tried with keyboard and mouse (Edit->Find) and results are the same.

Further testing: 
The same issue happens regardless of the type of Detached window. Happens with Debug,Problems,Progress etc windows. As long as there is a detached window focus returns to the detached window after doing a Find.

Configuration Info:
I'm currently running Mac OS 10.6.8 if that helps.
Also tested with build 20100218-1602 on Mac OS 10.6.7 with the same result.

Oz
Comment 5 Dani Megert CLA 2011-10-19 11:10:43 EDT
Works for me on Windows 7 and Linux GTK. Moving to SWT for comment.
Comment 6 Jean-Pierre Bergamin CLA 2013-09-20 03:06:33 EDT
I started to work on a Mac and I have the same issue. After using the find window and closing it (with Esc or Cmd-w) the focus is set on a detached window. I never observed this bahaviour on Windows, so it maybe only an issue on Mac.

How to reproduce:
 - Cmd-f in an editor window
 - "search for something"
 - Close find window with Esc or Cmd-w
 > Focus now is on a detached window

This is extremely annoying since this workflow is something I do like every two minutes and everytime I have to set the focus on the editor window again.
Comment 7 Jean-Pierre Bergamin CLA 2013-09-20 03:08:05 EDT
BTW: I'm using STS 3.3.0 with Eclipse Platform 4.3.0.v20130605-2000, Build id: I20130605-2000
Comment 8 Eclipse Genie CLA 2020-08-14 15:04:24 EDT
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.