Closed
Description
openedon Mar 23, 2021
Context:
- Playwright Version: 1.9.2
- Operating System: Linux
- Node.js version: 12
- Browser: Firefox
Code Snippet
const {chromium, webkit, firefox} = require('playwright');
(async () => {
const browser = await chromium.launch();
// ...
// locate <div contenteditable="true" id="contenteditable"></div>
await page.focus('#contenteditable');
await page.keyboard.type('Hello world');
await page.keyboard.down('Control');
await page.keyboard.down('Shift');
await page.keyboard.press('ArrowLeft');
await page.keyboard.up('Shift');
await page.keyboard.up('Control');
// Expectation is that the word "world" should be selected.
})();
Describe the bug
This was a strange issue for us. We encountered it on our CI that runs Linux and after playing around, we were able to determine that this only occurs for Firefox on Linux. Specifically, it also only seems to affect contenteditable="true"
nodes. It works fine for <input>
elements.
It seems that this does nothing in FF for Linux. The expected behavior is to select the word "world", as the keyboard shortcut Control + Shift + ArrowLeft is intended to do (works fine natively using Linux and contenteditables with FF).
Note: when we run this test, we are also running the same test on other browsers too. Could it be that there's a foreground issue with selection and FF?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels