mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 06:02:57 +03:00
fix(fill): use HTMLInputElement.select (#406)
This commit is contained in:
parent
f75ac45c42
commit
5c1f7cfb0c
@ -366,8 +366,7 @@ export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
|
||||
return 'Cannot fill a disabled input.';
|
||||
if (input.readOnly)
|
||||
return 'Cannot fill a readonly input.';
|
||||
input.selectionStart = 0;
|
||||
input.selectionEnd = input.value.length;
|
||||
input.select();
|
||||
input.focus();
|
||||
} else if (element.nodeName.toLowerCase() === 'textarea') {
|
||||
const textarea = element as HTMLTextAreaElement;
|
||||
|
Loading…
Reference in New Issue
Block a user