handling the focus on close and open
handlers cache should be removed to avoid memory leaks