Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-100614

Form Validator Doesn't Scroll to Invalid Fields if they Contain a hidden element



      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

      1. Login and go to 'Liferay DXP > Content > Web Content'
      2. Create a new test structure called 'Structure with mandatory field'
      3. To the top of the structure, add a text field or HTML field, and change the options so Required = YES
      4. Add about 6-10 more fields underneath the mandatory field to make the Web Content scrollable and Save it
      5. In Structures, click the More Options (kebab icon) button and Manage Templates
      6. Create an arbitrary template, and save
      7. Go back to 'Liferay DXP > Content > Web Content' and add new 'Structure with mandatory field'
      8. Enter a value for the title field 'test'
      9. Scroll down and hit 'Publish'

      Actual Result
      You will see that it does not scroll all the way up to the missing mandatory field.

      Expected Behavior
      That for the validation error it scrolls up to the mandatory field that has missing/invalid data.


        1. reproduce.gif
          2.74 MB
          Summer Zhang

          Issue Links



              • Assignee:
                summer.zhang Summer Zhang
                gregory.bretall Gregory Bretall (Inactive)
                Participants of an Issue:
                Recent user:
                Clarissa Velazquez
                Engineering Assignee:
                Jonathan Mak
              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:
                  Days since last comment:
                  23 weeks, 4 days ago


                  Version Package
                  7.1.10 DXP FP16
                  7.2.10 DXP FP3
                  7.2.1 CE GA2