[MGNLUI-8434] Creating or editing a new field jumps at the top of the Story, Tour Created: 27/Sep/23  Updated: 16/Nov/23  Resolved: 26/Oct/23

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: 6.3.0, 6.2.40

Type: Bug Priority: Neutral
Reporter: Laura Delnevo Assignee: Quach Hao Thien
Resolution: Fixed Votes: 1
Labels: ux-improvement-selected
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: 2.5d Time Spent: 2.5d
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Issue Links:
Problem/Incident
Relates
relates to CONTEDIT-587 Cursor jumps back in text block Open
duplicate
duplicates MGNLUI-8415 Multi field focus first field when "a... Closed
duplicates MGNLUI-4087 Set focus to newly created field when... Closed
is duplicated by CONTEDIT-584 After adding a new item in the dialog... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MGNLUI-8488 Implementation Sub-task In Progress Quach Hao Thien  
MGNLUI-8489 Review Sub-task Closed Antonín Juran  
MGNLUI-8490 PreintQA Sub-task To Do  
MGNLUI-8491 QA Sub-task To Do  
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: AuthorX improvements
Story Points: 2
Team: Nucleus
Work Started:
Approved:
Yes

 Description   

Steps to reproduce

  1. Go to Stories App
  2. Open an existing story 
  3. Add a new block: e.g. text
  4. The focus jumps at the top of the page

The same behavior happens on tour if you try to add tour type or destination (Multi field).. Logs, screenshots, gifs...

Expected results

Step 4. The focus stays in the block I am creating/editing 

Actual results

Step 4 The focus jumps at the top of the page

Workaround

NA

Development notes



 Comments   
Comment by Quach Hao Thien [ 18/Oct/23 ]

Discovery

Whenever a new field is added to the subform, it uses the index of that new field in subform (always 0) to set focus to the fields of the parent form, that is why it automatically scroll to first field of the form when a new field is added to the subform

https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/browse/magnolia-ui-framework/src/main/java/info/magnolia/ui/editor/FormView.java?at=refs%2Fheads%2Frelease%2F6.2#245

Possible solution:

https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/commits/33c5ed28feffcb8cc1f559620bd60997b903b50d#magnolia-ui-framework/src/main/java/info/magnolia/ui/editor/FormView.java

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