Skip to content

Magento Admin Product Custom Options Not Movable / Draggable in 2.4.4 #36051

@ksenia-zlotin

Description

@ksenia-zlotin

Preconditions and environment

-Magento 2.4.4
-jQuery 3.6.0

Steps to reproduce

  1. In a clean Magento 2.4.4 instance, create a product in the admin with 3 custom options.
  2. Try to drag the second option up to the first position.

Expected result

Custom option should drag and move to the first position while the first option should move down.

Actual result

The dragging action stops and gets stuck, does not complete.

Additional information

The issue comes from src/vendor/magento/module-ui/view/base/web/js/dynamic-rows/dnd.js:138 where the calculation is made:

drEl.minYpos =
                $table.offset().top - originRecord.offset().top + $table.children('thead').outerHeight();

jQuery updated the way it handles outerHeight function calls. Previously, in Magento 2.4.3-p1 which uses a jQuery version of 1.12.4, jQuery returned Null when outerHeight was called on a non-existent element. Then the minYpos value still returned a number value. This is why in the older Magento version, the drag and move action of custom options in Magento worked. This newer jQuery version used in the newer Magento version, however, returns undefined. Which is why the calculation referenced above returns Nan which breaks the drag and move action.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Admin UIComponent: UiIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.4Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branch

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions