Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fill() should check that element is focused before sending characters #133

Closed
dgozman opened this issue Dec 4, 2019 · 1 comment
Closed
Assignees

Comments

@dgozman
Copy link
Contributor

dgozman commented Dec 4, 2019

Perhaps, focus() could also return whether the element was actually focused?

@JoelEinbinder JoelEinbinder self-assigned this Dec 5, 2019
JoelEinbinder added a commit that referenced this issue Dec 9, 2019
An element is fillable if its:
- In dom
- Not display:none or visibility:hidden
- textarea or input or contenteditable

if textarea or input it must also be
- not readOnly
- not disabled

#133
@JoelEinbinder
Copy link
Contributor

I think this is sufficiently fixed by making sure the element is fillable, which is a subset of focusable. In theory a fillable element could be made unfocusable or unfillable through javascript, but javascript could do anything so there's no way for us to reliable to detect that.

sand4rt pushed a commit to sand4rt/playwright that referenced this issue Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants