activeFocus not being forwarded to TextInput inside TextField
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
Critical
|
Zoltan Balogh | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Committed
|
Critical
|
Cris Dywan | ||
ubuntu-ui-toolkit (Ubuntu RTM) |
New
|
Undecided
|
Unassigned | ||
webbrowser-app (Ubuntu) |
Fix Released
|
High
|
Olivier Tilloy |
Bug Description
Haven’t managed to reproduce with a standalone example yet, but I can reliably reproduce the following issue with the browser app on a tablet with a bluetooth keyboard connected (this needs to be on a tablet so that the wide layout of the app is used, for example with a Nexus 7 (flo) in landscape orientation):
1) launch the browser app with a bluetooth keyboard attached and ensure that the current tab is not a new tab
2) press Ctrl+T to open a new tab
Expected result: the address bar gets active focus so that the user can start entering a URL right away
Current result: the address bar gets active focus for a fraction of a second, then looses it. When that happens, pressing Ctrl+L (which forces focus on the address bar) doesn’t fix it.
I added some debugging to the browser (printing Window.
That situation can be remedied by using a bluetooth mouse to click on the address bar, which restores active focus on the QQuickTextInput.
Related branches
- system-apps-ci-bot: Needs Fixing (continuous-integration)
- PS Jenkins bot: Needs Fixing (continuous-integration)
-
Diff: 1198 lines (+666/-337)12 files modifiedsrc/app/CMakeLists.txt (+3/-1)
src/app/FilteredKeyboardModel.qml (+33/-0)
src/app/browserapplication.cpp (+2/-0)
src/app/qquickshortcut.cpp (+283/-0)
src/app/qquickshortcut_p.h (+109/-0)
src/app/webbrowser/Browser.qml (+200/-258)
src/app/webbrowser/KeyboardShortcut.qml (+0/-25)
src/app/webbrowser/KeyboardShortcuts.qml (+0/-41)
src/app/webbrowser/ListViewHighlight.qml (+2/-3)
src/app/webbrowser/NavigationBar.qml (+10/-7)
tests/autopilot/webbrowser_app/tests/test_keyboard.py (+22/-1)
tests/autopilot/webbrowser_app/tests/test_private.py (+2/-1)
- ubuntu-sdk-build-bot: Approve (continuous-integration)
- Ubuntu SDK team: Pending requested
-
Diff: 97 lines (+52/-4)2 files modifiedsrc/Ubuntu/Components/1.3/InputHandler.qml (+1/-3)
tests/unit_x11/tst_components/tst_textinput_common13.qml (+51/-1)
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Ubuntu SDK team: Pending requested
-
Diff: 122 lines (+69/-5)2 files modifiedsrc/Ubuntu/Components/1.3/InputHandler.qml (+1/-3)
tests/unit_x11/tst_components/tst_textinput_common13.qml (+68/-2)
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Ubuntu SDK team: Pending requested
-
Diff: 98 lines (+53/-4)2 files modifiedsrc/Ubuntu/Components/1.3/InputHandler.qml (+1/-3)
tests/unit_x11/tst_components/tst_textinput_common13.qml (+52/-1)
Changed in canonical-devices-system-image: | |
status: | New → Fix Committed |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Christian Dywan (kalikiana) |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → New |
tags: | added: lt-blocker |
Changed in canonical-devices-system-image: | |
assignee: | nobody → Zoltan Balogh (bzoltan) |
importance: | Undecided → Critical |
milestone: | none → 11 |
status: | New → In Progress |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Committed |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | In Progress → Fix Committed |
Changed in canonical-devices-system-image: | |
status: | Fix Committed → Fix Released |
Here’s the additional debug output from the instrumented browser:
[launching the browser, before pressing Ctrl+T] QMLTYPE_ 185(0xb7cc5ae0) e(0xb7d0f8c8) e_QML_174( 0xb80651a8) QMLTYPE_ 122_QML_ 197(0xb80a5398)
qml: AFI: Browser_
qml: AFI: QQuickFocusScop
qml: AFI: QQuickFocusScop
qml: AFI: WebViewImpl_
[after pressing Ctrl+T] (0xb7d844a8, "text_input") QMLTYPE_ 122_QML_ 197(0xb80a5398) 0xb814e608, "foldersList") QMLTYPE_ 134(0xb81266a0, "topSitesList") ate_QMLTYPE_ 132(0xb818f010, "topSiteItem") (0xb7d844a8, "text_input") QMLTYPE_ 71(0xb7d7b970, "addressBarText Field")
qml: AFI: QQuickTextInput
qml: AFI: WebViewImpl_
qml: AFI: QQuickListView(
qml: AFI: UrlPreviewGrid_
qml: AFI: UrlPreviewDeleg
qml: AFI: QQuickTextInput
qml: AFI: TextField_
As can be seen with the last two lines, activeFocus is initially forwarded to the QQuickTextInput inside the TextField, and then for some reason activeFocus switches back to the parent TextField, but is removed from the QQuickTextInput.