mbien commented on a change in pull request #3489:
URL: https://github.com/apache/netbeans/pull/3489#discussion_r790116966



##########
File path: 
platform/api.search/src/org/netbeans/modules/search/BasicSearchForm.java
##########
@@ -1119,8 +1121,23 @@ private void limitReached() {
         public MultiLineComboBoxEditor() {
             area.setWrapStyleWord(false);
             area.setLineWrap(false);
+
+            // retain standard focus traversal behavior
             
area.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERS‌​AL_KEYS, null);
             
area.setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERS‌​AL_KEYS, 
null);
+
+            // pretend to be a single line text field if you are small enough
+            area.addKeyListener(new KeyAdapter() {

Review comment:
       it is intended to be intuitive without the need to explain or configure 
anything. If it looks like a text field, it behaves just like it did before 
(users seem to like to use the Enter key as OK dialog action according to the 
mailing list and issue). But if you have a multi line-string in it you expect 
it having a working Enter key for new lines - if it would trigger the dialog 
action it would look like a bug too.
   
   toggle would create more issues. since if you turn it off again the Enter 
key would suddenly be the dialog action and the text field would contain multi 
line strings.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to