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.
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.
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.
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.
jirka, can you clarify best pratice here?
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.
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
7) CorrelationPropertyChooser
alexey ... did you mean to write "turned off" or "turned on"?
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".
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.
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.
Fixed.
Not work in: Edit Variable Dialog, Create New Corellation Property Dialog Fault Name Chooser Dialog Fault Variable Dialog
Reassign to Nikita.
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.
Waiving of the issue has been rejected so it has to be fixed in the release55 branch.
Created attachment 35038 [details] Waiving of the issue has been rejected so it has to be fixed in the release55 branch.
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.
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.
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.
committed to the release55 branch
For reference: issue 86849 is about the double-click inconsistency.
Verified in build 06.10.16