NASA-AMMOS / aerie-ui

The client application for Aerie.
https://nasa-ammos.github.io/aerie-docs/
MIT License
28 stars 5 forks source link

Activity Layer Context Menu Fix #1146

Closed AaronPlave closed 5 months ago

AaronPlave commented 5 months ago

Closes #1145 by removing the setTimeout previously used by LayerActivity's onContextMenu handler (originally intended to make sure we waited for the svelte selected activity/span id store to update) and instead immediately computing selected directive/span and passing that into the event. The setTimeout was causing the contextMenu object to mutate a second time outside of the normal context menu event loop which in turn caused LayerActivity to report that a new context menu event had occurred.

duranb commented 5 months ago

How was it getting passed the isRightClick() check?

AaronPlave commented 5 months ago

How was it getting passed the isRightClick() check?

The delay in dispatching the context menu event meant that the same event that triggered the context menu gets dispatched again