question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with blur() on textarea

See original GitHub issue

Issue: 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
NullVoxPopulicommented, Jun 8, 2018

I’d say so, yeah. No bug

1reaction
timjcookcommented, Jun 8, 2018

@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

await fillIn('textarea', 'My Input');
await blur('textarea');  

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found