Question: Could someone please explain me what is happening when I call GWT service and before service returns response I close browser or redirect to another page?
ps. As I know the onFailure method of the service call's callback is called..
Thanks in advance!

Answer: 
You can now do this in pure CSS so no JavaScript is needed.

The new CSS pseudo-class `:focus-within` would help for cases like this and will help with accessibility when people use tabbing for navigating, common when using screen readers.

```
.header_search:focus-within {
    border: 1px solid white;
}

```

---

> 
> The :focus-within pseudo-class matches elements that either themselves
>  match :focus or that have descendants which match :focus.
> 
> 
> 

You can check which browsers support this <http://caniuse.com/#search=focus-within>
I'm a little altered your example

[Live Demo](http://codepen.io/anon/pen/lpLIc)

**HTML**

```
<div class="header_search col-lg-5">
   <form role="form" action="hledat.php" method="get">
      <input type="text">
   </form>
</div>

```

**CSS**

```
.header_search {
        border: 0px;
    }

.header_search input:focus {
    border: 1px solid white;
}

```