Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): context menu highlight and pointer handoff follow keyboard focus #18876

ClosedTonybynMp4(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/18876/headopened View on GitHub

Showing 2 changed files with 214 additions and 0 deletions (loading 1).

x
0 of 2 viewed, 2 left
214 additions and 0 deletionsapps/web/src/contextMenuFallback.test.tsModified
View file
@@ -69,6 +69,18 @@
this.attributes.set(name, value);
​
+ matches(selector: string) {
+ return selector === ":focus-visible" && this.focused;
+ }
+​
+ getAttribute(name: string) {
+ return this.attributes.get(name) ?? null;
+ }
+​
+ click() {
+ this.dispatchEvent(new FakeDomEvent("click"));
+ }
+​
dispatchEvent(event: FakeDomEvent) {
for (const listener of this.listeners.get(event.type) ?? []) {
listener(event);
@@ -87,6 +99,8 @@
this.dispatchEvent(new FakeDomEvent("focus"));
​
+ scrollIntoView() {}
+​
blur() {
const fakeDocument = document as unknown as FakeDocument;
if (fakeDocument.activeElement === this) {