Affects Version/s: 7.1.X, 7.2.X, Master
Component/s: ~ [Archived] Frontend Infrastructure
When you attempt to publish with an invalid field and the focusInvalidField function gets called to scroll up to the field, if that field's first child is display: none then it won't scroll into view.
Steps to Reproduce
- Login and go to 'Liferay DXP > Content > Web Content'
- Create a new test structure called 'Structure with mandatory field'
- To the top of the structure, add a text field or HTML field, and change the options so Required = YES
- Add about 6-10 more fields underneath the mandatory field to make the Web Content scrollable and Save it
- In Structures, click the More Options (kebab icon) button and Manage Templates
- Create an arbitrary template, and save
- Go back to 'Liferay DXP > Content > Web Content' and add new 'Structure with mandatory field'
- Enter a value for the title field 'test'
- Scroll down and hit 'Publish'
You will see that it does not scroll all the way up to the missing mandatory field.
That for the validation error it scrolls up to the mandatory field that has missing/invalid data.