-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
-Magento 2.4.4
-jQuery 3.6.0
Steps to reproduce
- In a clean Magento 2.4.4 instance, create a product in the admin with 3 custom options.
- 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
Labels
Type
Projects
Status