8000 fix: ctrl-click in mac app and safari didnt open context menu by abose · Pull Request #1994 · phcode-dev/phoenix · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@abose
Copy link
Member
@abose abose commented Dec 17, 2024

Fixes: https://github.com/orgs/phcode-dev/discussions/1993

This issue existed from our first desktop version released in Apr 2024 which used the safari engine. In the desktop app, we cant open context menus with ctrl-click on mac as it will get dismissed as soon as it opens.
This is a mac desktop and safari only issue with ctrl-click based context menu activation. Context menu activation with right mouse button click works as expected.
The issue happens only in safari as it treats ctrl-click based right click in mac differently:

  • In Chrome, when you Cmd+Click, it treats it as a special context menu event and doesn't trigger the normal click handlers
  • In Safari, Cmd+Click generates both a context menu event AND a regular click event, which triggers the clearMenus handler. The twin calls leads to the context menu getting dismissed as the second event gets treated as a click event outside popup to dismiss it.
  • We now account for this safari quirk.

@sonarqubecloud
Copy link

@abose abose merged commit f047fb7 into main Dec 17, 2024
17 of 18 checks passed
@abose abose deleted the y branch December 17, 2024 11:49
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.

2 participants

0