This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 85411 - A11y: Enter doesn't work as OK in dialogs while focus in types tree
Summary: A11y: Enter doesn't work as OK in dialogs while focus in types tree
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Nikita Krjukov
URL:
Keywords: A11Y
Depends on:
Blocks:
 
Reported: 2006-09-21 09:11 UTC by Maksim Khramov
Modified: 2006-10-18 10:39 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Waiving of the issue has been rejected so it has to be fixed in the release55 branch. (11.31 KB, text/plain)
2006-10-09 14:22 UTC, Nikita Krjukov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Khramov 2006-09-21 09:11:49 UTC
Steps to reproduce:
Create new BPEL diagram and invoke Add Variable dialog.
Type name for variable
Select variable type from types tree.
Press Enter.
Nothing happens. OK is the default button, so Enter should activate OK.

If switch focus to variable name field or any other control, the Enter is work.
Comment 1 Michael Frisino 2006-09-21 13:20:37 UTC
i see this problem too. The strange thing is that Cancel is the default action
initially and that does respond to Enter. But once the OK button is enabled,
enter has no effect.
Comment 2 Alexey Anjeleevich 2006-09-21 14:51:38 UTC
I've fixed this, but I don't sure that this is a problem. Some componentes can
use enter key press for own needs. For these cases there is another default
shortcut for default button: Ctrl-ENTER. And even before my fix this shortcut
worked correctly. 
Comment 3 Michael Frisino 2006-09-21 15:01:48 UTC
jirka, can you clarify best pratice here?
Comment 4 Jiri Kopsa 2006-09-21 15:09:21 UTC
Enter key should run the default action (which is usually OK), if it is not
consumed by a focused components.

Tree choosers should not consume the Enter key, they don't need to.
Comment 5 Alexey Anjeleevich 2006-09-21 15:31:05 UTC
Okey. So I've extended this fix by others TreeChoosers (turned off execution of
default node action by double click or enter key press). Changed choosers list
below.

1) VariableChooser
2) CorrelationPropertyTypeChooser
3) MessageExchangeChooser
4) FaultNameChooser
5) PropAliasTypeChooser
6) CorrelationSetChooser
Comment 6 Alexey Anjeleevich 2006-09-21 15:34:42 UTC
7) CorrelationPropertyChooser
Comment 7 Michael Frisino 2006-09-21 16:01:30 UTC
alexey ... did you mean to write "turned off" or "turned on"? 
Comment 8 Alexey Anjeleevich 2006-09-21 16:18:01 UTC
By default on enter press and double click treeChooser executes current node
defult action. So to fix this bug this feature has been turned off by call of
method BeenTreeView::allowDefaultAction(boolean allow) with parameter "false".
Comment 9 Michael Frisino 2006-09-21 16:50:58 UTC
Alexey, I think you went too far. 
You have disabled the double click selection on these choosers? 
I do not believe that was Jirka's intent

it seems that Enter key works as before.
Comment 10 Jiri Kopsa 2006-09-21 22:49:42 UTC
Let me clarify this.

This issue is about the fact that Enter didn't work to OK the dialog in some cases.

The ideal state is: Enter OKs the dialog without any respect to currently
focused component (with some exceptions - described lower), and double click on
an item in a tree selects the item and OKs the dialog (in case of choosers).

To be more specific: The Enter key should not be consumed by most of the
components and it should be passed to the dialog, where default action is then
invoked. The only components (I can think of now) that can consume Enter key are
editor pane, combo box (when selecting an item from pulldown) and table (a cell
editor). In a tree, the enter should be passed to the dialog and default action
(OK) should be invoked.

In regards to double click - my understanding is that that's a separate topic.
If we had double click to OK the dialog before, let's keep it. That's desired
behaviour. At least in simple dialogs such as choosers.
Comment 11 Alexey Anjeleevich 2006-09-22 16:30:42 UTC
Fixed.
Comment 12 Maksim Khramov 2006-10-03 10:17:30 UTC
Not work in:
Edit Variable Dialog,
Create New Corellation Property Dialog
Fault Name Chooser Dialog
Fault Variable Dialog
Comment 13 Alexey Anjeleevich 2006-10-03 15:26:21 UTC
Reassign to Nikita.
Comment 14 Nikita Krjukov 2006-10-05 19:24:30 UTC
I fixed this issue in the release55_dev branch

The Enter key works well in all dialogs:
-- Create/Edit Variable,
-- Create New Corellation Property
-- Create New Property Alias
-- Fault Name Chooser

-- All tree choosers which are called from the property sheet
   -- Fault Variable (see Throw element)
   -- All other Variable Choosers
   
I don't going to fix this bug in the release55 because of it has P3 priority.
Comment 15 Nikita Krjukov 2006-10-09 14:00:53 UTC
Waiving of the issue has been rejected so it has to be fixed in the release55 
branch.
Comment 16 Nikita Krjukov 2006-10-09 14:22:56 UTC
Created attachment 35038 [details]
Waiving of the issue has been rejected so it has to be fixed in the release55 branch.
Comment 17 Alexey Anjeleevich 2006-10-09 15:29:04 UTC
Reason of this bug is BeanTreeView component witch executes its default action
on press of Enter key, but sometimes this is undesirable.
The fix disables this default behaviour of BeanTreeView by setting flag
DefaultActionAllowed to FALSE. This is safe and low risk operation.



Comment 18 Michael Frisino 2006-10-10 03:34:22 UTC
I do not want this fix committed to release55 until it is reviewed more. When
Nikita was on vacation, and Alexey attempted fix, he fixed this problem but
introduced more problems. Basically, he fixed the default action but eliminated
the "dbl click" action on the bean tree nodes. I want to make sure that Nikita's
fix has not introduced similar bad side effects which will be worse than the
original problem.

Comment 19 Michael Frisino 2006-10-10 12:14:01 UTC
Is is as I feared. The fix to enable the OK on Enter has been implemented at the
expense of losing the Dbl-Click support on leaf nodes. Talking to Jirka, we
decided that loss of dbl-click action on leaf node is acceptable trade off in
order to get Enter key support required by a11y.


However, we have found some inconsistency rleated to Dbl-Click on branchv vs leaf. 
opening new bug to reflect the problem with inconstent Dbl-Click. It is a
separate issue from this bug.
Comment 20 Nikita Krjukov 2006-10-10 12:50:04 UTC
committed to the release55 branch
Comment 21 artibee 2006-10-10 18:45:58 UTC
For reference: issue 86849 is about the double-click inconsistency.
Comment 22 Maksim Khramov 2006-10-18 10:39:14 UTC
Verified in build 06.10.16