[MGNLUI-8154] When I open a story, it scrolls down the bottom of the page Created: 09/May/23 Updated: 28/Jul/23 Resolved: 28/Jul/23 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0, 6.2.38 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Laura Delnevo | Assignee: | Quach Hao Thien |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | VN-Analysis, VN-Maintenance | ||
| Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
| Σ Time Spent: | 4d 3h | Time Spent: | 4d 3h |
| Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
| Attachments: |
|
|||||||||||||||||||||||||
| Issue Links: |
|
|||||||||||||||||||||||||
| Sub-Tasks: |
|
|||||||||||||||||||||||||
| 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: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
|||||||||||||||||||||||||
| Date of First Response: | ||||||||||||||||||||||||||
| Epic Link: | Maintenance of vaadin8 framework | |||||||||||||||||||||||||
| Sprint: | Nucleus 41 | |||||||||||||||||||||||||
| Story Points: | 5 | |||||||||||||||||||||||||
| Team: | ||||||||||||||||||||||||||
| Work Started: | ||||||||||||||||||||||||||
| Approved: |
Yes
|
|||||||||||||||||||||||||
| Description |
Steps to reproduce
Expected resultsThe screen stays at the top of the story Actual resultsThe screen scrolls down to a random place at the bottom of the page WorkaroundDevelopment notesAs discovery, this issue is a side effect of this PR https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/2264/overview |
| Comments |
| Comment by Roman Kovařík [ 10/May/23 ] |
|
Could SUPPORT-16391 be the same issue? |
| Comment by Thuy To [ 03/Jul/23 ] |
|
Discovery: This happened from Mag 6.2.7 which was impacted by issues fixed on UI https://git.magnolia-cms.com/projects/PLATFORM/repos/ui/pull-requests/2264/overview
|
| Comment by Quach Hao Thien [ 11/Jul/23 ] |
DiscoveryThe issue happens on the MultiFormView like MultiBlockView or MultiLinkFormView, which contain multiple field containers and every field container has its own field index system. And the code which causes the issue:
private JsArray<Element> getFieldCaptions(Widget widget) { return JQueryWrapper .select(widget) <<< HERE .find(".v-formlayout-captioncell .v-caption") .get(); } The method above aims to return all the field captions within the widget (or container). By scoping only to the widget, there is only a limited number of field captions are returned, not all the field captions of the form are as expected. Propose solutionInstead of a query that finds the field captions within the widget, the query should find from the top container of the form, e.g: private JsArray<Element> getFieldCaptions(Widget widget) { Widget topParent = getTopParentOf(widget); return JQueryWrapper .select(topParent) .find(".v-formlayout-captioncell .v-caption") .get(); } Potential issues:
private Element getInputFieldByIndex(Widget widget, int fieldIndex) { JsArray<Element> elements = getFieldCaptions(widget); Element element = elements.length() > fieldIndex ? elements.get(fieldIndex) : elements.get(0); <<< HERE Element controlContainer = getControlByLabel(element); JsArray<Element> nestedInputs = getNestedInputs(controlContainer); //Only get the first input field return nestedInputs.get(0); }
private JsArray<Element> getNestedInputs(Element controlContainer) { return JQueryWrapper .select(controlContainer) .find("textarea, input[type]:not([type=search]):not([type=url]):not([type=hidden])") .get(); }
|