Issue with blur() on textarea
See original GitHub issueIssue: I can’t seem to trigger a blur/focus out event on a textarea
using the blur()
method. I’ve applied the same pattern to input
fields and it has worked as expected.
Example: I would expect the following to blur the textarea
.
await fillIn('textarea', 'My Input');
await blur('textarea');
Interestingly I was able to get my desired outcome by doing:
await fillIn('textarea', 'My Input');
await find('textarea').blur();
Which is very similar to what it seems blur()
is doing under the hood.
As I mentioned I haven’t had this issue on other input types like input
or select
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Ajax issue with input, textarea blur - javascript - Stack Overflow
As .blur() functions is bind only with the elements which are loaded for the first time during page load. But when you make...
Read more >Element: blur event - Web APIs | MDN
The blur event fires when an element has lost focus. The event does not bubble, but the related focusout event that follows does...
Read more >Focusing: focus/blur - The Modern JavaScript Tutorial
Losing the focus generally means: “the data has been entered”, so we can run the code to check it or even to save...
Read more >Textarea.blur() - Pure JavaScript [Book] - O'Reilly
The blur() method of the Textarea object removes the focus from the text area. Be careful when using this method in conjunction with...
Read more >onblur Event - W3Schools
object.onblur = function(){myScript};. Try it Yourself ». In JavaScript, using the addEventListener() method: object.addEventListener("blur", myScript);.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’d say so, yeah. No bug
@NullVoxPopuli Thanks for the feedback. Looks like our tests should be working as expected.
I’ve given it another go and switched back to my original test
and it seems to be working fine, which makes sense because I couldn’t see any issues when I had a look at the internals of the
blur
helper. My guess is it had something to do with my test server playing up and now it is behaving itself.I’m satisfied that this is not a bug, what do you think? ok if I close it?