diff options
author | Josh Bell <josh@lindenlab.com> | 2007-02-20 22:02:36 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-02-20 22:02:36 +0000 |
commit | 7dada07dbaae3dfb9b1319453e51019bfff2717f (patch) | |
tree | a7f2b84ea65c39cee31474640dd5f265c0b2f432 /indra/llui/llpanel.cpp | |
parent | 73bc0fb42b5bcd80030d9f30d5cb57ec2397ba08 (diff) |
svn merge -r 57620:58007 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance
Diffstat (limited to 'indra/llui/llpanel.cpp')
-rw-r--r-- | indra/llui/llpanel.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 91bf6befe7..de65ce14f6 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -338,16 +338,6 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) gFocusMgr.childHasKeyboardFocus(this) && !called_from_parent ) { LLUICtrl* cur_focus = gFocusMgr.getKeyboardFocus(); - if (key == KEY_RETURN && mask == MASK_NONE) - { - // set keyboard focus to self to trigger commitOnFocusLost behavior on current ctrl - if (cur_focus && cur_focus->acceptsTextInput()) - { - cur_focus->onCommit(); - handled = TRUE; - } - } - // If we have a default button, click it when // return is pressed, unless current focus is a return-capturing button // in which case *that* button will handle the return key @@ -363,6 +353,16 @@ BOOL LLPanel::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) handled = TRUE; } } + + if (key == KEY_RETURN && mask == MASK_NONE) + { + // set keyboard focus to self to trigger commitOnFocusLost behavior on current ctrl + if (cur_focus && cur_focus->acceptsTextInput()) + { + cur_focus->onCommit(); + handled = TRUE; + } + } } return handled; |