editor: finish remove hack TODO

The upstream fix was merged, so the workaround is no longer needed.
This commit is contained in:
David Lechner
2022-11-22 15:56:56 -06:00
committed by David Lechner
parent 764083e6be
commit db438be40b
2 changed files with 4 additions and 19 deletions
+4
View File
@@ -58,6 +58,10 @@ const specialCases: Record<string, string> = {
function addWhichToKeyboardEvent(e: KeyboardEvent) {
// blueprints and testing-library both don't do this one
if (e.key === 'ContextMenu') {
// HACK: work around lack of ContextMenu key support in user-events
if (e.target !== null) {
e.target.dispatchEvent(new MouseEvent('contextmenu', { bubbles: true }));
}
return;
}