click-to-component icon indicating copy to clipboard operation
click-to-component copied to clipboard

`Option` + `Click` on link element is overlapped with browser native download behavior.

Open iamyoki opened this issue 3 years ago • 1 comments

Describe the bug Option + Click on link element is overlapped with browser native download behavior.

OS Macos

To Reproduce Steps to reproduce the behavior:

  1. Option + Click on some link element like <a href=...>
  2. Will download the link

Expected behavior Not overlapped with download behavior.

Screenshots image

Desktop (please complete the following information):

  • OS: Macos
  • Browser: [e.g. chrome, safari]
  • Version: latest

Additional context This happens because of hotkey conflict, I can think of 2 ways of solutions:

  1. Change to another hotkey.
  2. Add event.preventDefault() but that will deactivate the download behavior and that is not perfect https://github.com/ericclemmons/click-to-component/blob/535727a05ba0e68f13e74bb32f4b34ce4869586b/packages/click-to-react-component/src/ClickToComponent.js#L86-L102

iamyoki avatar Jun 14 '22 03:06 iamyoki

Another solution could be allowing the user to customize what modifier key to use. For example, I'd love to be able to set it to ctrl-opt-shift click, or cmd-opt click.

phoebejaffe avatar Sep 03 '22 01:09 phoebejaffe