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
Tab bar steals keyboard focus with >10 tabs #4472
Labels
bug: behavior
Something doesn't work as intended, but doesn't crash.
component: keyinput
Issues related to processing keypresses.
priority: 1 - middle
Issues which should be done at some point, but aren't that important.
Comments
The-Compiler
added
component: keyinput
Issues related to processing keypresses.
priority: 1 - middle
Issues which should be done at some point, but aren't that important.
bug: behavior
Something doesn't work as intended, but doesn't crash.
labels
Dec 12, 2018
This feels somewhat related to qt mnemonics (see #3245)
I'm guessing we can't reproduce it for the same reason we can't reproduce that
issue (maybe kde does something to enable mnemonics). Either way, the tabbar
shouldn't be stealing focus during the hide/show.
Florian Bruhin writes:
… Reported by @ml-:
> Tab setup:
> - Open 9 tabs with any page (say duckduckgo.com)
> - Open qutebrowser.org as the 10th tab (title of site starts with the letter q)
> - Having >= 10 tabs is a requirement to reproduce this
>
> Bindings in this example:
> - `bind <alt-q> :tab-prev`
> - `bind <alt-w> :tab-next`
>
> What happens?
> - pressing `<alt-w>` works fine since the 10th's tab title doesn't start with a w
> - pressing `<alt-q>` jumps to the 10th tab regardless of what tab you currently are on
Full logs (didn't look at them yet): https://crashes.qutebrowser.org/view/0093e50b
Based on the "10 tabs" requirements this is probably yet another issue with `TabWidget._toggle_visibility` - I'm guessing showing the bar somehow steals keyboard focus? Might only be reproducible on KDE though.
cc @jgkamat
|
Here's the related log:
15:10:58 DEBUG modes modeman:_handle_keypress:172 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
15:10:58 DEBUG keyboard basekeyparser:_debug_log:91 Got key: 0x57 / modifiers: 0x8000000 / text: '<Alt+w>' / dry_run True
15:10:58 DEBUG modes modeman:_handle_keypress:199 match: 2, forward_unbound_keys: auto, passthrough: False, is_non_alnum: True, dry_run: True --> filter: True (focused: <PyQt5.QtWidgets.QWidget object at 0x7f10847b3318>)
15:10:58 DEBUG modes modeman:_handle_keypress:172 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
15:10:58 DEBUG keyboard basekeyparser:_debug_log:91 Got key: 0x57 / modifiers: 0x8000000 / text: '<Alt+w>' / dry_run False
15:10:58 DEBUG keyboard basekeyparser:_debug_log:91 Definitive match for '<Alt+w>'.
15:10:58 DEBUG keyboard basekeyparser:_debug_log:91 Clearing keystring (was: <Alt+w>).
15:10:58 DEBUG commands command:run:534 command called: tab-next
15:10:58 DEBUG commands command:run:549 Calling qutebrowser.browser.commands.CommandDispatcher.tab_next(<qutebrowser.browser.commands.CommandDispatcher>, 1)
15:10:58 DEBUG misc app:on_focus_object_changed:836 Focus object changed: <PyQt5.QtWidgets.QWidget object at 0x7f10a8574f78>
15:10:58 DEBUG modes tabbedbrowser:on_current_changed:691 Current tab changed, focusing <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=0 url='https://start.duckduckgo.com/'>
15:10:58 DEBUG modes tabbedbrowser:on_current_changed:699 Mode before tab change: normal (mode_on_change = normal)
15:10:58 DEBUG modes modeman:leave:307 Ignoring leave request for KeyMode.hint (reason tab changed) as we're in mode KeyMode.normal
15:10:58 DEBUG modes modeman:leave:307 Ignoring leave request for KeyMode.caret (reason tab changed) as we're in mode KeyMode.normal
15:10:58 DEBUG modes modeman:leave:307 Ignoring leave request for KeyMode.insert (reason tab changed) as we're in mode KeyMode.normal
15:10:58 DEBUG modes modeman:leave:307 Ignoring leave request for KeyMode.passthrough (reason tab changed) as we're in mode KeyMode.normal
15:10:58 DEBUG modes tabbedbrowser:on_current_changed:711 Mode after tab change: normal (mode_on_change = normal)
15:10:58 DEBUG modes modeman:_handle_keypress:199 match: 2, forward_unbound_keys: auto, passthrough: False, is_non_alnum: True, dry_run: False --> filter: True (focused: <PyQt5.QtWidgets.QWidget object at 0x7f10a8574f78>)
15:10:58 DEBUG modes modeman:_handle_keyrelease:219 filter: True
15:10:59 DEBUG modes modeman:_handle_keypress:172 got keypress in mode KeyMode.normal - delegating to <qutebrowser.keyinput.modeparsers.NormalKeyParser>
15:10:59 DEBUG keyboard basekeyparser:_debug_log:91 Got key: 0x51 / modifiers: 0x8000000 / text: '<Alt+q>' / dry_run True
15:10:59 DEBUG modes modeman:_handle_keypress:199 match: 2, forward_unbound_keys: auto, passthrough: False, is_non_alnum: True, dry_run: True --> filter: True (focused: <PyQt5.QtWidgets.QWidget object at 0x7f10a8574f78>)
15:10:59 DEBUG misc app:on_focus_object_changed:836 Focus object changed: <PyQt5.QtWidgets.QWidget object at 0x7f10847b3318>
15:10:59 DEBUG modes tabbedbrowser:on_current_changed:691 Current tab changed, focusing <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=13 url='http://qutebrowser.org/'>
Looks to me like the focus object is correct (on the page (from the previous
tab switch), but for some reason, either the keypress is not filtered (even
though filter: True).
I don't think this is related to the focus toggle, because ml can reproduce
this with 10 tabs (while the focus hack kicks in at 11).
Do you know why every keypress results in two calls to the handler (except the
bad one), one with dry_run=True and one with dry_run=False? Maybe this is
related to this line, which sets dry_run=True for ShortcutOverride (I'm
guessing that after reaching 10 tabs, mnemonics are treated like shortcuts).
However, that dosen't make much sense since we should still be filtering the
key (returning true in eventFilter), so it shouldn't go to the page:
https://github.com/qutebrowser/qutebrowser/blob/master/qutebrowser/keyinput/modeman.py#L349
|
Seems something weird KDE does:
Wonder if there's some workaround. |
Workaround (as found in the KDE bugreports)Add
to the file |
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: keyinput
Issues related to processing keypresses.
priority: 1 - middle
Issues which should be done at some point, but aren't that important.
Reported by @ml-:
Full logs (didn't look at them yet): https://crashes.qutebrowser.org/view/0093e50b
Based on the "10 tabs" requirements this is probably yet another issue with
TabWidget._toggle_visibility
- I'm guessing showing the bar somehow steals keyboard focus? Might only be reproducible on KDE though.cc @jgkamat
The text was updated successfully, but these errors were encountered: