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

Feature - add blur method #99

Open
moshfeu opened this issue May 4, 2020 · 3 comments
Open

Feature - add blur method #99

moshfeu opened this issue May 4, 2020 · 3 comments

Comments

@moshfeu
Copy link

moshfeu commented May 4, 2020

Just like click, I would like to trigger blur on elements.
One use case is when I want to show / hide elements based on if another element in focus or not (and I don't have another element to click on)

@GabiGrin
Copy link
Contributor

GabiGrin commented May 4, 2020

@moshfeu how would a user do that if he doesn't have another element to click?
I strive for unidriver to allow what real users (and testers) can do, and blur per-se isn't a real action. It's implementation

@moshfeu
Copy link
Author

moshfeu commented May 4, 2020

Thanks.
Can I trigger a click on the body? because the user might has only one element in the page (It's a use case but meant to make a point).

@GabiGrin

@jonathanadler
Copy link

Hey guys 👋

I know this is already pretty old, but just wanted to point out that blur is in fact a real action:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/blur

It removes the focus from the selected element, and the activeElement is assigned either the body dom element or null.

I got to this issue cause I was actually checking to see if it would be possible to add a focus method.
I can try to contribute if needed 😊

@GabiGrin wdyt?

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

3 participants