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

Form Builder breaks when resizing and dragging fields

    Details

      Description

      Description

      Form Builder breaks when resizing and dragging fields.

      Steps to Reproduce

      1. Go to Control Panel > App Builder > Custom Objects > Add a Custom Object;
      2. Add a Form View > add a Text field > add Date field;
      3. Resize the Text field to the left;
      4. Drag the Text field to the right column (empty space) - BUG 1;
      5. Resize the Date field to the left;
      6. Drag the Date field to the right column (empty space) - BUG 2 (the field is not placed in the target position, it is resized to all the available space);
      7. Resize the Date field to the right column (empty space) - OK (the field is resized as expected);
      8. Drag the Text field to the right column (empty space) - BUG 3 (the field disappears);

      Expected Result

      Form Builder doesn't break when resizing and dragging fields.

      Actual Result

      Form Builder breaks when resizing and dragging fields.

       Logs:

       

      FormSupport.es.js:169 Uncaught TypeError: Cannot read property 'fields' of undefined
       at isEmptyColumn (FormSupport.es.js:169)
       at Object.addFieldToColumn (FormSupport.es.js:98)
       at addField (fieldAddedHandler.es.js:63)
       at _default (fieldMovedHandler.es.js:95)
       at LayoutProvider._handleFieldMoved (LayoutProvider.es.js:406)
       at LayoutProvider.runListeners_ (EventEmitter.js:391)
       at LayoutProvider.emit (EventEmitter.js:148)
       at LayoutProvider.dispatch (LayoutProvider.es.js:73)
       at MoveableFields._handleFieldMoved (withMoveableFields.es.js:178)
       at MoveableFields._handleDragAndDropEnd (withMoveableFields.es.js:154)
       
      fieldClickedHandler.es.js:19 Uncaught TypeError: Cannot read property 'settingsContext' of undefined
       at handleFieldClicked (fieldClickedHandler.es.js:19)
       at LayoutProvider._handleFieldClicked (LayoutProvider.es.js:390)
       at LayoutProvider.runListeners_ (EventEmitter.js:391)
       at LayoutProvider.emit (EventEmitter.js:148)
       at LayoutProvider.dispatch (LayoutProvider.es.js:73)
       at ClickableFields._handleFieldClicked (withClickableFields.es.js:60)
       at ClickableFields.runListeners_ (EventEmitter.js:391)
       at ClickableFields.emit (EventEmitter.js:148)
       at DomEventEmitterProxy.emitOnTarget_ (EventEmitterProxy.js:100)
       at triggerListeners_ (domNamed.js:905)
      

       

      Reproduced In
      master: d5185c8a0d9ce804e4956e47f6dc9d99ce74f287

        Attachments

          Activity

            People

            Assignee:
            guilherme.freire Guilherme Freire
            Reporter:
            alex.candido Alex Candido
            Participants of an Issue:
            Recent user:
            Jason Pince
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              18 weeks, 3 days ago

                Packages

                Version Package
                7.3.4 CE GA5
                7.3.10 DXP GA1
                Master