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

              summer.zhang Summer Zhang
              gregory.bretall Gregory Bretall (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Jonathan Mak Jonathan Mak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 5 weeks, 4 days ago

                Packages

                  Version Package
                  7.1.10 DXP FP16
                  7.1.X
                  7.2.10 DXP FP3
                  7.2.1 CE GA2
                  7.2.X
                  7.3.10 DXP GA1
                  Master