As a user field focussing and tabbing should work well in dialogs
(MGNLUI-1978)
|
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | user interaction |
| Affects Version/s: | 5.2.3 |
| Fix Version/s: | None |
| Type: | Sub-task | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
Pressing Enter key should submit a form, the same as pushing the Save or Confirm button. But this shortcut key should not trigger the action if the focus is currently in a textarea or richtextfield, because a user may simply want to add an enter. Failed attempts: Button commitButton = (Button)(editorActionAreaView.getViewForAction(BaseDialog.COMMIT_ACTION_NAME).asVaadinComponent());
commitButton.setClickShortcut(KeyCode.ENTER);
With both those methods - the following failed:
Possible Approaches: |
| Comments |
| Comment by Jozef Chocholacek [ 04/Apr/14 ] |
|
What about adding a FieldEvents.FocusListener and FieldEvents.BlurListener (from the com.vaadin.event package) to the Field constructed by the TextFieldFactory, that will turn off/on the ENTER key handling in case that the TextField has more than one row, i.e. it is represented by a TextArea? |
| Comment by Christopher Zimmermann [ 10/Apr/14 ] |
|
Its easy to implement as part of |