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

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 weeks, 5 days ago

                  Packages

                  Version Package
                  7.1.X
                  7.2.10 DXP FP3
                  7.2.X
                  7.2.1 CE GA2
                  Master