Refocus webview after spawning a background tab
This commit is contained in:
parent
538b4fafdb
commit
95093b82c9
@ -487,6 +487,8 @@ class TabbedBrowser(QWidget):
|
||||
tab.resize(self.widget.currentWidget().size())
|
||||
self.widget.tab_index_changed.emit(self.widget.currentIndex(),
|
||||
self.widget.count())
|
||||
# Refocus webview in case we lost it by spawning a bg tab
|
||||
self.widget.currentWidget().setFocus()
|
||||
else:
|
||||
self.widget.setCurrentWidget(tab)
|
||||
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68076
|
||||
|
@ -203,17 +203,6 @@ Feature: Using hints
|
||||
And I run :fake-key new
|
||||
Then the javascript message "contents: existingnew" should be logged
|
||||
|
||||
Scenario: Typing input with existing text after opening a bg tab
|
||||
When I open data/hints/link_input.html
|
||||
And I run :click-element id qute-input-existing
|
||||
And I wait for "Entering mode KeyMode.insert *" in the log
|
||||
And I run :leave-mode
|
||||
And I hint with args "all tab-bg" and follow a
|
||||
And I wait until data/hello.txt is loaded
|
||||
And I run :enter-mode insert
|
||||
And I run :fake-key -g new
|
||||
Then the javascript message "contents: existingnew" should be logged
|
||||
|
||||
### iframes
|
||||
Scenario: Using :follow-hint inside an iframe
|
||||
When I open data/hints/iframe.html
|
||||
|
@ -1250,3 +1250,25 @@ Feature: Tab management
|
||||
Then the following tabs should be open:
|
||||
- data/numbers/1.txt
|
||||
- data/numbers/2.txt (pinned) (active)
|
||||
|
||||
|
||||
Scenario: Focused webview after clicking link in bg
|
||||
When I open data/hints/link_input.html
|
||||
And I run :click-element id qute-input-existing
|
||||
And I wait for "Entering mode KeyMode.insert *" in the log
|
||||
And I run :leave-mode
|
||||
And I hint with args "all tab-bg" and follow a
|
||||
And I wait until data/hello.txt is loaded
|
||||
And I run :enter-mode insert
|
||||
And I run :fake-key -g new
|
||||
Then the javascript message "contents: existingnew" should be logged
|
||||
|
||||
Scenario: Focused webview after opening link in bg
|
||||
When I open data/hints/link_input.html
|
||||
And I run :click-element id qute-input-existing
|
||||
And I wait for "Entering mode KeyMode.insert *" in the log
|
||||
And I run :leave-mode
|
||||
And I open data/hello.txt in a new background tab
|
||||
And I run :enter-mode insert
|
||||
And I run :fake-key -g new
|
||||
Then the javascript message "contents: existingnew" should be logged
|
||||
|
Loading…
Reference in New Issue
Block a user