[MGNLUI-2993] Pressing enter in search text field should trigger search in Chooser Dialogs Created: 11/Jun/14  Updated: 05/Dec/14  Resolved: 27/Aug/14

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.9, 5.3.3

Type: Bug Priority: Neutral
Reporter: Boris Kraft Assignee: Chunhua Liu
Resolution: Fixed Votes: 0
Labels: next, quickwin, support, usability, ux
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File Screen Shot 2014-06-11 at 13.37.24.jpg     JPEG File Screen Shot 2014-06-11 at 13.40.28.jpg    
Issue Links:
Relates
duplicate
is duplicated by MGNLUI-3102 Hitting Enter when in chooser's searc... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

Open a chooser dialog (e.g. Page Chooser, Asset Chooser), enter a string into the search text field and press <enter>
-> this will close the search dialog where as one would expect it would trigger the search

Workaround:

  • Click on the magnifying glass instead


 Comments   
Comment by Chunhua Liu [ 14/Aug/14 ]

Please review code on branch MGNLUI-2993-chunhua.liu-5.3.3 and MGNLUI-2993-chunhua.liu-5.2.9 in project (ce-bundle and magnolia-ui).

Comment by Mikaël Geljić [ 18/Aug/14 ]

Filtering keyboard shortcuts should not be the responsibility of a field — in other words, extending the TextField component should not be necessary.

We would opt for a Vaadin Extension (see the TextAreaStretcher for an example).
Additionally, when doing so, we'd like to hook such handler tighter to the "GWT ways" (e.g. onbrowserevent, or even better with an event preview — that is before the event is actually fired).

Please feel free to ask if you need additional input/support on this.

Side note: admittedly, the Panel-based approach that we generally use to 'scope' keyboard shortcuts doesn't work here; we would have nested panels and the parent would always be triggered no matter what.

Comment by Chunhua Liu [ 27/Aug/14 ]

Implemented solution using Vaadin extension.

Comment by Mikaël Geljić [ 29/Aug/14 ]

Much nicer
FYI I did some more QA adjustments myself rather than reopening, in particular:

I will now mark the ticket as reviewed, squash those commits and integrate it.

Final note: by the way the event handling was actually good as is.

Generated at Mon Feb 12 09:02:10 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.