Skip to content

Safari drag/drop fixes#2271

Open
lzandman wants to merge 8 commits intogchq:masterfrom
lzandman:leon/fix-safari-dragdrop
Open

Safari drag/drop fixes#2271
lzandman wants to merge 8 commits intogchq:masterfrom
lzandman:leon/fix-safari-dragdrop

Conversation

@lzandman
Copy link
Copy Markdown

While using CyberChef with macOS Safari I noticed two issues.

  1. When dragging an operation from the Operations panel to the Recipe panel, the description popover reappears mid-drag over the Recipe section. This prevents dropping the operation because the popover re-shows itself and visually/functionally blocks the drop.

  2. It's not possible to drop an Operation onto the Favorites item. This was earlier reported in issues Bug report: Edit favorites in Safari #1602 and Bug report: <Safari issue> #1710. A comment under that second issue mentions a workaround where holding the ⌘ Command button while dragging fixes this issue. However, it would be better to just support default dragging, like it does on Chrome.

Here's a screen grab showing both issues (note that at the end I show the workaround, by holding the ⌘ Command button while dragging):

CyberChef_SafariDragIssues.mp4

I looked into these issues and managed to fix them both. I introduced the flag dragInProgress, that is used to keep track of the dragging operation. This bypasses Safari's handling of the effectAllowed property and some weirdness related to MouseEvent.buttons.

I tested this on the latest versions of Safari and Chrome running on macOS Tahoe 26.3.1 and it seems to work just fine on both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug report: <Safari issue> Bug report: Edit favorites in Safari

1 participant