Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): theme context menus on Windows and Linux #6440

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/6440/headopened View on GitHub

Showing 4 changed files with 173 additions and 0 deletions (loading 3).

x
0 of 4 viewed, 4 left
173 additions and 0 deletionsapps/web/src/contextMenuFallback.test.tsModified
View file
@@ -19,6 +19,8 @@
​
+let activeElement: FakeElement | null = null;
+​
class FakeElement {
children: FakeElement[] = [];
parent: FakeElement | null = null;
@@ -27,7 +29,9 @@
className = "";
disabled = false;
type = "";
+ tabIndex = 0;
private textValue = "";
+ private readonly attributes = new Map<string, string>();
private readonly listeners = new Map<string, FakeListener[]>();
​
constructor(readonly tagName: string) {}
@@ -47,6 +51,9 @@
this.parent.children.splice(index, 1);
this.parent = null;
+ if (activeElement === this) {
+ activeElement = null;
+ }
​