mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-19 10:16:34 +01:00
Fixed scrolling to anchor(#) links in background tabs.
Setting correct QWebPage::viewportSize() on creation. Closes #663
This commit is contained in:
parent
7c9d7fd25c
commit
60550fcbfb
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,3 +32,4 @@ tests/modeltest
|
||||
*.embed.manifest
|
||||
bin/autotests
|
||||
.clang_complete
|
||||
.tx/
|
||||
|
@ -347,6 +347,17 @@ int TabWidget::addView(QNetworkRequest req, const QString &title, const Qz::NewT
|
||||
m_isClosingToLastTabIndex = true;
|
||||
}
|
||||
|
||||
if (openFlags & Qz::NT_NotSelectedTab) {
|
||||
WebTab* currentWebTab = weTab();
|
||||
// Workarounding invalid QWebPage::viewportSize() until QWebView is shown
|
||||
// Fixes invalid scrolling to anchor(#) links
|
||||
if (currentWebTab && currentWebTab->view()) {
|
||||
TabbedWebView* currentView = currentWebTab->view();
|
||||
webView->resize(currentView->size());
|
||||
webView->page()->setViewportSize(currentView->page()->viewportSize());
|
||||
}
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user