Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page title is lost at navigation #5269

Open
arza-zara opened this issue Mar 5, 2020 · 2 comments
Open

Page title is lost at navigation #5269

arza-zara opened this issue Mar 5, 2020 · 2 comments
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. component: ui Issues related to the user interface.

Comments

@arza-zara
Copy link
Member

When the title should stay the same in navigation, in some cases it's replaced with the URL.

To reproduce:

  • Open a page that has a title.
  • Press g o enter.

→ The title is replaced with the URL.

Or:

  • Open a GitHub PR page.
  • Click "Files changed" tab.
  • Press H.

→ The title is replaced with the URL.

commands  command:run:541 command called: back
commands  command:run:555 Calling qutebrowser.browser.commands.CommandDispatcher.back(<qutebrowser.browser.commands.CommandDispatcher>, False, False, False, 1)
webview   browsertab:_on_before_load_started:961 Going to start loading: https://github.com/qutebrowser/qutebrowser/pull/5209
webview   tabbedbrowser:_on_title_changed:750 Changing title for idx 3 to 'https://github.com/qutebrowser/qutebrowser/pull/5209'
webview   browsertab:_on_before_load_started:961 Going to start loading: https://github.com/qutebrowser/qutebrowser/pull/5209
webview   tabbedbrowser:_on_title_changed:750 Changing title for idx 3 to 'https://github.com/qutebrowser/qutebrowser/pull/5209'
modes     modeman:_handle_keypress:268 match: 2, forward_unbound_keys: auto, passthrough: True, is_non_alnum: True, dry_run: False --> filter: True (focused: <PyQt5.QtWidgets.QWidget object at 0x7fc0b0967160>)
webview   browsertab:_set_load_status:927 load status for <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=3 url='https://github.com/qutebrowser/qutebrowser/pull/5209/files'>: LoadStatus.success_https
signals   signalfilter:_filter_signals:87 emitting: cur_load_status_changed(<LoadStatus.success_https: 3>) (tab 3)
webview   browsertab:_set_load_status:927 load status for <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=3 url='https://github.com/qutebrowser/qutebrowser/pull/5209/files'>: LoadStatus.loading
signals   signalfilter:_filter_signals:87 emitting: cur_load_status_changed(<LoadStatus.loading: 6>) (tab 3)
signals   signalfilter:_filter_signals:87 emitting: cur_load_started() (tab 3)
modes     modeman:_handle_keyrelease:293 filter: True
signals   signalfilter:_filter_signals:87 emitting: cur_url_changed(PyQt5.QtCore.QUrl('https://github.com/qutebrowser/qutebrowser/pull/5209')) (tab 3)
webview   browsertab:_set_load_status:927 load status for <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=3 url='https://github.com/qutebrowser/qutebrowser/pull/5209'>: LoadStatus.success_https
signals   signalfilter:_filter_signals:87 emitting: cur_load_status_changed(<LoadStatus.success_https: 3>) (tab 3)

I tried setting the title in _on_load_finished (arza-zara@c23936a) – this fixes only the former case.

--- qutebrowser/browser/browsertab.py
+++ qutebrowser/browser/browsertab.py
@@ -1020,5 +1020,7 @@ class AbstractTab(QWidget):
         self.load_finished.emit(ok)
 
-        if not self.title():
+        if self.title():
+            self.title_changed.emit(self.title())
+        else:
             self.title_changed.emit(self.url().toDisplayString())

df45e74, Qt 5.14.1, Chromium 77.0.3865.129

@arza-zara arza-zara added component: ui Issues related to the user interface. bug: behavior Something doesn't work as intended, but doesn't crash. labels Mar 5, 2020
@The-Compiler
Copy link
Member

@arza-zara
Copy link
Member Author

Workaround: :bind st jseval document.title=document.title+'.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: behavior Something doesn't work as intended, but doesn't crash. component: ui Issues related to the user interface.
Projects
None yet
Development

No branches or pull requests

2 participants