Fix tabs management problem in html5