I have a div, #someDiv, on which I have some jQuery code to execute when focused on, and when focused out. But I want to achieve an action in which, if a certain other div is clicked on when div #1 is focused on, that focus remains on the div:

```
$(document).on("focus", "#someDiv", function() {

// Some code here to execute

}).on("focusout", "#someDiv", function() {

if (#someDiv2 was clicked on) { // DON'T focus out from #someDiv }

});

```

...however the issue is that jQuery is unable to distinguish that during the focus out, a click was made. How can I achieve this effect?

EDIT: Basically the idea I am trying to implement is a mock web-app in which you can customize a certain kind of div when it has focus, and upon that, an "options" div appears. I don't want the options bar to disappear when it is clicked, as otherwise none of the "options" can be chosen.