91667[BUGFIX] Correction of moving and copying of content elements
Commit message
Review
-
Code review CR -1
- Friedemann Altrock -1
-
Verified V +1
- Jonas Eberle +1
- core-ci +1 CI
Issues 4
Files 2
Review log 1417
-
Dennis Purisevic uploaded patch set 1 11/14/25, 12:44
-
core-ci voted on patch set 1 V +1 11/14/25, 12:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89689
-
Dennis Purisevic updated the commit message in patch set 2
V +111/14/25, 13:24 -
core-ci voted on patch set 2 V +1 11/14/25, 13:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/89691
-
Max Frerichs commented on patch set 2 11/14/25, 15:20
-
Dennis Purisevic commented on patch set 2 11/14/25, 15:49
drag-drop-utility.ts:24ReplyThe problem was that the browsers dropEffect won't be set to move. This patch removes the browsers evaluation completely. So I don't consider this a workaround, but rather a better/cleaner implementation, since we don't call “isCopyModifierFromEvent” twice in a row and it's more readable. Yes, I see that the evaluation can be placed within the isCopyModifierFromEvent method, but the method is called after updateEventAndTooltipToReflectCopyMoveIntention has been called to there is no need to check it again. Can you give me an example so that I can better understand your point of view? -
Max Frerichs commented on patch set 2 11/14/25, 17:02
drag-drop-utility.ts:24ReplyAh, I see - it's not intended as workaround, but to improve readability. Thanks for explaining. :-) Regarding my suggestion: When you look into isCopyModifierFromEvent, evaluation of event data happens here to determine the correct action - which is fine. This evaluation now also happens in updateEventAndTooltipToReflectCopyMoveIntention, although slightly different - which seems to work fine, but it is a bit confusing. For this reason I think, the better approach would be doing the evaluation only once in isCopyModifierFromEvent and updating the event itself in updateEventAndTooltipToReflectCopyMoveIntention based on what isCopyModifierFromEvent is returning. I hope I was able to explain my point of view clearly. -
Friedemann Altrock commented on patch set 2 CR -1 11/17/25, 19:34
I do not think event.dataTransfer.dropEffect can be relied on to have a consistent cross-platform behavior. Browsers currently interpret the HTML specification differently.drag-drop-utility.ts:28`getModifierState` expects the key name to be Capitalized, `normalizedCtrlModifierKey` is all lowercase though. This call will always return `false`. -
Dennis Purisevic uploaded patch set 3
CR -1V +111/20/25, 10:47 -
Dennis Purisevic commented on patch set 3 11/20/25, 10:53
Reply
The `event.dataTransfer.dropEffect` property is only set in the `updateEventAndTooltipToReflectCopyMoveIntention` method. Therefore, if a copy or move operation is desired, this is not checked by the `dropEffect` property, but by the `isCopyModifierFromEvent` method.drag-drop-utility.ts:28ReplyChanged it quite a bit and made it simpler. Removed the `getModifierState` and used the `event.altKey` and `event.ctrlKey` to check for a copy command. Tested it on Safari, Firefox and Chrome on Mac. -
core-ci voted on patch set 3 V +1 11/20/25, 10:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/90261
-
Friedemann Altrock commented on patch set 3 11/21/25, 12:03
Hi Dennis, I like the latest version of this patch. Is it OK if I integrate your change into https://review.typo3.org/c/Packages/TYPO3.CMS/+/91580 so we can focus on one patch? -
Dennis Purisevic commented on patch set 3 11/21/25, 15:18
Reply
Yes, of course, no problem. But if you don't want to make any further changes, I'm not sure if that would mean more work :D. -
Jonas Eberle voted on patch set 3 V +1 11/26/25, 11:14
-
Friedemann Altrock commented on patch set 3 CR -1 11/26/25, 12:47
Reply
Hi Dennis, quick update here: after thinking about a bit, IMO pulling in a dependency on the Hotkey module is not the way to go here. I will do review -1 on this, in favor of Max's change (91580). The platform detection is orthogonal (aka unrelated) and should probably live in a separate file anyway. We can open a new change to unify the Mac platform check form both the hotkey module and the drag & drop utility. -
Dennis Purisevic commented on patch set 3 11/26/25, 14:05
Reply
I don't see a problem with the Hotkey API dependency. I could move the check directly into DragDropUtility, but I'm not sure if that's better. Yes, the platform check could be contained in its own API, but I'm not sure. This patch fixes the regression from 13.4.8, which ultimately fixes the Chrome bug that then conflicts with Max's changes. Since this is too much discussion for this bug fix, I will merge my changes into 91580, change the commit message, and abandon this change, as a longer discussion takes more time than it should. -
Dennis Purisevic abandoned the change 11/26/25, 18:36
Conflict with 91580
drag-drop-utility.ts:24