Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix double message context menu #3551

Merged
merged 2 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Fixed
- fix bug where composer was locked after joining a group via qr code
- fix double message context menu #3550

<a id="1_41_3"></a>

Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/message/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ export default function Message(props: {
const showMenu: (
event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement, MouseEvent>
) => Promise<void> = async event => {
event.preventDefault() // prevent default runtime context menu from opening

const chat = await BackendRemote.rpc.getFullChatById(
accountId,
message.chatId
Expand All @@ -314,7 +316,6 @@ export default function Message(props: {
)
const [cursorX, cursorY] = [event.clientX, event.clientY]

event.preventDefault() // prevent default runtime context menu from opening
openContextMenu({
cursorX,
cursorY,
Expand Down
Loading