fix bugs of if moving tabs

If user moves tabs, and he release the mouse over close button or new tab button, the tab will be close or new a tab unexpectedly.