diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 22ad7dd6b..b01c9d282 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -433,8 +433,12 @@ class TabbedBrowser(tabwidget.TabWidget): # Make sure the background tab has the correct initial size. # With a foreground tab, it's going to be resized correctly by the # layout anyways. - tab_size = QSize(self.width(), - self.height() - self.tabBar().height()) + if self.tabBar().vertical: + tab_size = QSize(self.width() - self.tabBar().width(), + self.height()) + else: + tab_size = QSize(self.width(), + self.height() - self.tabBar().height()) tab.resize(tab_size) self.tab_index_changed.emit(self.currentIndex(), self.count()) else: diff --git a/tests/end2end/features/javascript.feature b/tests/end2end/features/javascript.feature index efdd692ac..c6c7acc15 100644 --- a/tests/end2end/features/javascript.feature +++ b/tests/end2end/features/javascript.feature @@ -116,3 +116,12 @@ Feature: Javascript stuff And I wait for "[*/data/javascript/windowsize.html:*] loaded" in the log And I run :tab-next Then the window sizes should be the same + + Scenario: Checking visible/invisible window size with vertical tabbar + When I run :tab-only + And I set general -> log-javascript-console to info + And I set tabs -> position to left + And I open data/javascript/windowsize.html in a new background tab + And I wait for "[*/data/javascript/windowsize.html:*] loaded" in the log + And I run :tab-next + Then the window sizes should be the same