Impossible issue with context menu #1

Closed
opened 2022-07-17 00:35:17 +02:00 by VityaSchel · 2 comments
VityaSchel commented 2022-07-17 00:35:17 +02:00 (Migrated from github.com)

An impossible issue with fucking webkit

  1. Context menu should appear on RMB
  2. Context menu should disappear on blur (LMB outside AND outside of browser window, any else what causes "blur" event)
  3. Native context menu should appear on RMB ONLY IF CONTEXT MENU VISIBLE

Problem

Because of React, onContextMenu called AFTER blur event. In blur event ContextMenu disappears, and in onContextMenu handler sees visible=false

Any variations of timeout not only unreliable but also doesn't work.

# An impossible issue with fucking webkit 1. Context menu should appear on RMB 2. Context menu should disappear on blur (LMB outside AND outside of browser window, any else what causes "blur" event) 3. Native context menu should appear on RMB ONLY IF CONTEXT MENU VISIBLE # Problem Because of React, onContextMenu called AFTER blur event. In blur event ContextMenu disappears, and in onContextMenu handler sees visible=false Any variations of timeout not only unreliable but also doesn't work.
VityaSchel commented 2022-07-17 00:39:06 +02:00 (Migrated from github.com)

Possible solution #1

Somehow send data from onBlur event to onContextMenu event right after that.

In onContextMenu use that data and ignore visible variable state

# Possible solution #1 Somehow send data from onBlur event to onContextMenu event right after that. In onContextMenu use that data and ignore visible variable state
VityaSchel commented 2022-07-17 00:56:42 +02:00 (Migrated from github.com)

I'm leaving web-dev

I'm leaving web-dev
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: hloth/replica-player#1
No description provided.