Bug 8849 - escape should hide fast view
Summary: escape should hide fast view
Status: RESOLVED DUPLICATE of bug 12360
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 9408 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-31 11:25 EST by Greg Adams CLA
Modified: 2002-05-07 15:57 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Adams CLA 2002-01-31 11:25:56 EST
Stable: 20020125

When a fast view is visible pressing escape should hide it.Escape is a common 
action for dismiss.

/Greg
Comment 1 Kevin Haaland CLA 2002-02-11 18:38:31 EST
*** Bug 9408 has been marked as a duplicate of this bug. ***
Comment 2 Simon Arsenault CLA 2002-02-12 11:00:51 EST
This feature request cannot be implemented at the moment. SWT has no support 
for grabbing key events before the widget processes them. Therefore, we would 
need the view to hook-up a key listener on all its widgets and notify the 
workbench when the escape key is hit. We all remember the problems we ran into 
in the past when we required views to notify us of focus events. I can't add a 
menu item like "Minimize Fast View   ESC" because then the Esc key would be 
consumed by the accel table handling (even if the item is disabled).

Unless someone has another option, I recommend we resolve this pr as LATER and 
move it to the SWT component.
Comment 3 Nick Edgar CLA 2002-02-12 11:38:50 EST
We should hang onto the PR and flag it as another use case for better key 
handling from SWT.

I tried mapping ESC to activate editor early in the accessibility work, but ran 
into the problems you describe when it's defined as an accelerator.
If we could get the key event from SWT before processing by accelerators, then 
we could do this, and it would address the fast view use case.
Comment 4 Mike Wilson CLA 2002-02-12 11:51:31 EST
The ESC key current comes in via the traversal mechanism. We already 
support "climbing" versions of some of the traversal keys (eg. for handling 
the tabs in a tabbed folder). We can make ESC handling work the same way, 
although there could be side-effects if some widget in the parent-child tree 
believes that it is handling ESC traversal.

SN to implement _if_this_ok_ with the UI team. KH to indicate if this is 
wanted.
Comment 5 Nick Edgar CLA 2002-03-11 22:13:18 EST
Tried adding traverse listener for ESC on the shell, which activates the 
current editor, which has the side effect of minimizing any active fast view.
The traverse listener does get called now, however it also gets called when 
inapproriate, e.g when doing a rename in the Navigator or a cell editor (or 
any other control editor).  The change in focus actually causes any partial 
edit to be accepted, not canceled.

This is similar to what was happening when I tried simply specifying an 
accelerator for Esc to active the editor.

Since SWT does not know the difference between the control editor and any 
other view widget, it can't treat this case specially.  It seems any control 
editor would also have to hook a traverse listener on ESC to set doit=false.
Since we can't know the internal structure of views, and whether they use a 
control editor, I don't see how to solve this.

Backing out of change pending recommendation from SWT. 
Comment 6 Steve Northover CLA 2002-05-06 18:35:50 EDT

*** This bug has been marked as a duplicate of 12360 ***
Comment 7 Mike Wilson CLA 2002-05-07 08:58:07 EDT
SN to discuss the nature of the fix with McQ.
Comment 8 Nick Edgar CLA 2002-05-07 13:23:34 EDT
Could you also comment on my questions above?
Thanks
Comment 9 Steve Northover CLA 2002-05-07 15:57:21 EDT
The fix is that if anybody hooks traverse and sets doit=false, the climb up the 
hierarchy is halted.  In the case of the control editor, it sees the ESC and 
sets doit=false causing the climbing to stop before the fast view sees the key.