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.

Non-actionable warning in console: You tried to return focus to null but it is not in the DOM anymore

See original GitHub issue

I am seeing a lot of messages in the console: You tried to return focus to null but it is not in the DOM anymore. I am unsure how to make this warning go away.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
jccodecommented, Apr 28, 2016

Still seeing this warning too. 😦

Reproduce steps:

  1. Construct 2 modals, named it modal_A and modal_B.
  2. Open modal_A (with one button).
  3. In modal_A 's click handler, try to close modal_A and open modal_B.
  4. When you try to close modal_B, you can see the warning messages in console window.
1reaction
diasbrunocommented, Dec 11, 2017

@jccode @mrkvngrkn Please follow issue #577. We are discussing how we are going to handle this properly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Focus DOM Element in React App in useEffect Problem
It works with an input field. But the component itself got no input field and when i insert one with type="hidden", it does...
Read more >
Accessible modal dialog component for React.JS
Consider warning here and // deprecating this convenience. ... console.warn('You tried to return focus to '+toFocus+' but it is not in the DOM...
Read more >
Build a full-featured Modal dialog Form with React
In this tutorial, you'll create a form in a modal with React. The Modal pops up on a button click. A form is...
Read more >
NDepend Release Notes
When a class or an interface x implements in baseline an empty interface and not anymore (or vice-versa) the extension method x.WasChanged() now...
Read more >
Professional ASP.NET MVC 3 - itismajo.it
Brad Wilson is not only my favorite skeptic but also a talented Developer at ... and shows you how to set up your...
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