Fix issue MR-317 - Difficulty right-clicking on Tab

Fix issue MR-318 - Wrong tab gets selected when tab names overflow on the tab bar