1

Is there elegant way to determine if focusout focus is suppose to end up in element that is part of current window? Well I guess it would be enough to know id of element that was focused in, that caused focus out.

$('body').on("focusout", ".control-container > input", function () {

   var escapeContext = ???
   if (escapeContext within currentWindow)
   {
      DoSomething();
   }
   else
   {
      DoNothingAndStayInFocus();                
   }

});

My goal is to make DOM non-reactive if user changes browser tab, just as if you switched to another window.

Toshier
  • 11
  • 1

0 Answers0