[MGNLUI-5575] Inline edit feature is incompatible with default action set Created: 23/Dec/19  Updated: 23/Dec/19

Status: Open
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Low
Reporter: Šimon Demočko Assignee: Šimon Demočko
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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)
Epic Link: Keyboard shortcuts

 Description   

This has already been documented in the past here https://documentation.magnolia-cms.com/display/DOCS62/Content+view+definition+-+6+UI 

 You cannot define a default action and use inline editing at the same time.

Currently, when both are enabled, they work together, but clash. 

  • If nothing is selected, ENTER triggers inline edit and another ENTER saves changes.
  • If a single item is selected, ENTER triggers inline edit and immediately triggers default action.
  • If a single item is selected and inline editor is open (e.g. via "e" shortcut), pressing ENTER saves inline edit changes and immediately opens currently selected item.

Development notes

The main problem is that ENTER opens inline editor eagerly on client side, before server shortcut listeners on ENTER can do anything.

Since ENTER is not supposed to be the shortcut for inline editing (it is supposed to be "e") a shortcut listener on "e" could check if inline editor was triggered with "e" instead of enter and modify behavior of ENTER depending on this. This was initially experimented with, but it broke some functionality. More experimentation would need to take place or client side changes introduced. Client side changes could also address other issues as well (e.g. MGNLUI-5565)

 


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