gchq / CyberChef

The Cyber Swiss Army Knife - a web app for encryption, encoding, compression and data analysis
https://gchq.github.io/CyberChef
Apache License 2.0
28.71k stars 3.22k forks source link

Bug report: <Safari issue> #1710

Open stonewallrust opened 8 months ago

stonewallrust commented 8 months ago

Safari on macOS will not allow for adding to favorites with drag and drop. I can perform it with the Edge browser on macOS.

cbrunnkvist commented 6 months ago

Works fine in Brave browser as well.

I put a breakpoint in Safari and it does seem like the drag-over event gets triggered, but something else prevents further action e.g. change the style, receive drop further down the line ...

Screenshot 2024-04-03 at 12 48 49
cbrunnkvist commented 6 months ago

The check for if ("move" !== e.dataTransfer.effectAllowed) is what prevents it from working (it becomes "copyMove").

Other notes On Safari on a mac - effectAllowed cannot be set programatically, therefore any dropEffect that gets set is valid. When you press the cmd key the effectAllowed becomes "move" and when you press the alt key the effectAllowed becomes "copy". Thereafter it works as you would hope, if the dropEffect is not one of these effectAlloweds the drop is not allowed by the browser.

(source)

So, at least there is a workaround for Safari-users who need this functionality to work now: Hold ⌘ Command while draggnig the item to the Favorites tab.

stonewallrust commented 5 months ago

Thank you for the response and tip.

Is there also a secret to getting favorites to save in Safari? I had edited them and made them my own, and then the next day they were gone… poof!

From: Conny Brunnkvist @.> Date: Wednesday, April 3, 2024 at 5:44 AM To: gchq/CyberChef @.> Cc: Barker, Andrew @.>, Author @.> Subject: [EXTERNAL] Re: [gchq/CyberChef] Bug report: (Issue #1710) CAUTION: This email originated from outside of SLED. Do not click links or open attachments unless you recognize the sender and know the content is safe.

The check for if ("move" !== e.dataTransfer.effectAllowed) is what prevents it from working.

Other notes On Safari on a mac - effectAllowed cannot be set programatically, therefore any dropEffect that gets set is valid. When you press the cmd key the effectAllowed becomes "move" and when you press the alt key the effectAllowed becomes "copy". Thereafter it works as you would hope, if the dropEffect is not one of these effectAlloweds the drop is not allowed by the browser.

(sourcehttps://github.com/stevendwood/html5-dropzone/blob/master/README.md)

So, at least there is a workaround for Safari-users who need this functionality to work now: Hold ⌘ Command while draggnig the item to the Favorites tab.

— Reply to this email directly, view it on GitHubhttps://github.com/gchq/CyberChef/issues/1710#issuecomment-2034077252, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUHL6YCTK3IZLR2HFTVU3CLY3PFQFAVCNFSM6AAAAABDBPUEB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGA3TOMRVGI. You are receiving this because you authored the thread.Message ID: @.***>

cbrunnkvist commented 4 months ago

Thank you for the response and tip. Is there also a secret to getting favorites to save in Safari? I had edited them and made them my own, and then the next day they were gone… poof!

No idea - Favorites work perfectly for me now (-after I discovered you just need to drag-drop while holding the Command key).

Do note that the preferences are kept in LocalStorage, which the browser keeps unique to each URL / origin. That comes with the following consequence: