Sathish Kumar k k
Sathish Kumar k k

Reputation: 1842

How to write onFocusOut for a DIV

I tried to use DOJO on focus out method but it is not working. I have the link to work out.

Click here.

require(["dojo/on"], function(on){
  on(foc, "focusout", function(e){
  alert("hi");
  });
});

HTML

<div id="foc" > work on focus out</div>

Upvotes: 2

Views: 3857

Answers (1)

undefined
undefined

Reputation: 2101

Answered here(second answer). To focus a div you must assign its tabindex.

Upvotes: 3

Related Questions