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

Bug 221158

Summary: do not focus on the summary field when moving between editors
Product: z_Archived Reporter: Jakub Jurkiewicz <jakub.jurkiewicz>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P2 CC: mik.kersten
Version: unspecified   
Target Milestone: 3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 262510    
Bug Blocks:    
Attachments:
Description Flags
possible Fix
none
mylyn/context/zip
none
mylyn/context/zip
none
mylyn/context/zip
none
patch to disable focus tracking
none
patch none

Description Jakub Jurkiewicz CLA 2008-03-03 10:48:48 EST
Steps to reproduce:
1. Open editor for creating new task
2. Write something in the Summary field of the task
3. Go to the Description field of the task and write something in there
4. Go to some other editor
5. Go back to the editor with the new task -> Focus is on the Summary field and not on the Description field where it was while leaving the editor
This behavior is annoying especially when one wants to copy something from some other editor and paste it into to the Description field in the place where he/she stopped writing.
Comment 1 Frank Becker CLA 2008-03-10 17:46:16 EDT
Created attachment 92094 [details]
possible Fix

I think that can fix this for the following Controls.

estimated, issueReportURL, Summary and Note

What do you think?
Comment 2 Frank Becker CLA 2008-03-10 17:46:18 EDT
Created attachment 92095 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2008-04-29 02:41:28 EDT
Thanks Frank. I have implemented it in a similar way as suggested by your patch. Essentially any control that can accept focus gets a focus listener that remembers the last control that had focus for the next activation of the page. 
Comment 4 Steffen Pingel CLA 2008-04-29 02:41:31 EDT
Created attachment 97911 [details]
mylyn/context/zip
Comment 5 Steffen Pingel CLA 2008-04-30 00:43:31 EDT
Created attachment 98118 [details]
mylyn/context/zip
Comment 6 Steffen Pingel CLA 2008-06-12 22:33:28 EDT
Reopening to address a regression that is causing the task editor to change the scroll position when it gets the focus.
Comment 7 Steffen Pingel CLA 2008-06-12 22:43:03 EDT
Created attachment 104797 [details]
patch to disable focus tracking
Comment 8 Steffen Pingel CLA 2008-06-12 23:18:03 EDT
Created attachment 104800 [details]
patch
Comment 9 Steffen Pingel CLA 2008-06-12 23:20:24 EDT
I have committed this patch. The behavior is now the following:

- the form toolkit does not track focus, i.e. not "automatic" scrolling
- when text is typed into a text field the form scrolls to the that text field
- when the form gains focus it will restore the focus to the control that had it last

Restoring focus will fail in certain cases, e.g. when controls are lazily constructed. I am deferring further tweaks to the next milestone.
Comment 10 Steffen Pingel CLA 2009-05-29 01:28:21 EDT
Further improvements will be tracked on bug 236084.