Prevent Firefox's global paste behavior if paste target is not also focused (#2581)

* Prevent Firefox's global paste behavior if paste target is not also focused

* Write a test, fix code thanks to test

* Add one more comment to test
This commit is contained in:
Frank Noirot
2024-06-04 14:36:34 -04:00
committed by GitHub
parent c9800a58d0
commit 29cdc66b34
4 changed files with 95 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { test, expect, Page, Download } from '@playwright/test'
import { EngineCommand } from '../../src/lang/std/engineConnection'
import os from 'os'
import fsp from 'fs/promises'
import pixelMatch from 'pixelmatch'
import { PNG } from 'pngjs'
@ -443,3 +444,8 @@ export const doExport = async (
outputType: output.type,
}
}
/**
* Gets the appropriate modifier key for the platform.
*/
export const metaModifier = os.platform() === 'darwin' ? 'Meta' : 'Control'