Input doesn't receive activeFocus when focusing a textfield after keyboard dismissed

Bug #1518352 reported by Michael Sheldon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Zoltan Balogh
ubuntu-ui-toolkit (Ubuntu RTM)
Fix Released
High
Michael Sheldon

Bug Description

When setting focus programmatically on a TextField the input area doesn't receive focus correctly if the keyboard has been previously dismissed by the user while in that field.

Dismissing the keyboard removes activeFocus from the input component inside the TextField, and this is never restored when setting focus on the TextField as a whole (it does get restored if the TextField is clicked by the user).

Steps to reproduce:

1) Run the following QML:

import QtQuick 2.4
import Ubuntu.Components 1.3

Column {
    width: 600
    height: 800
    TextField {
        id: field

        anchors {
            left: parent.left
            right: parent.right
        }
    }
    Button {
        text: "Set Focus"
        anchors {
            left: parent.left
            right: parent.right
        }
        onClicked: {
            field.forceActiveFocus()
        }
    }
}

2) Tap the input area

3) Swipe down on the keyboard to dismiss it

4) Press "Set Focus" button

Expected result:

TextField should receive focus, display the input caret and show the keyboard

Actual result:

The TextField receives focus, but the input component inside it doesn't receive activeFocus and the input caret and keyboard aren't displayed

Related branches

Bill Filler (bfiller)
Changed in canonical-devices-system-image:
milestone: none → ww02-2016
assignee: nobody → Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Zoltan Balogh (bzoltan)
importance: Undecided → High
Changed in canonical-devices-system-image:
importance: Undecided → High
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Depends on fix to bug #1518357

Changed in canonical-devices-system-image:
status: New → In Progress
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: Zoltan Balogh (bzoltan) → Michael Sheldon (michael-sheldon)
status: New → In Progress
Zoltan Balogh (bzoltan)
affects: ubuntu-ui-toolkit (Ubuntu) → ubuntu-ui-toolkit (Ubuntu RTM)
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu RTM):
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :
Download full text (4.0 KiB)

This bug was fixed in the package ubuntu-ui-toolkit 1.3.1778+15.04.20151217.1-0ubuntu1 in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/stable-phone-overlay

---------------

ubuntu-ui-toolkit (1.3.1778+15.04.20151217.1-0ubuntu1) vivid; urgency=medium

  [ Andrea Bernabei ]
  * Rework Scrollbars and add ScrollView component.

  [ Zsombor Egri ]
  * Refactor UCSwipeAreaPrivate to use QQuickItemPrivate instead of being
    a QObject.

  [ Tim Peeters ]
  * Reduce toolbar height on phone in landscape orientation.
    Fixes LP: #1336793.
  * Introduce the new Toolbar component for the header edit mode.
  * Reduce the PageHeader height by 1 GU on phone in landscape orientation.
    Fixes LP: #1336793
  * Fix AppHeader 1.2 to use the new MathUtils. This fixes a failing autopilot
    CPO test.

  [ Zoltan Balogh ]
  * Do not wipe when provisioning for normal use and improve
    regression detection.
  * Try to link Gestures more explicitely. (kudos to xnox).

  [ Christian Dywan ]
  * Proper keyboard navigation and focus visuals for buttons.
    Fixes LP: #1225139, LP: #1514850
  * Escape should close popover. Fixes LP: #1523828
  * Surround state overloading message with static boolean. Fixes LP: #1523399
  * Don't exit, return 1 from export_modules_dir.sh.

  [ Michael Sheldon ]
  * Set the activeFocus on the input component when a text input area receive
    focus. Fixes LP: #1518352

  [ Benjamin Zeller ]
  * Move PageTreeNode to C++.
  * Custom property flag needs to be set always even when the value itself does not change.

  [ Albert Astals Cid ]
  * Make some more members slots
    This way we can use them in unity8 to make the drag areas more easily
    testable by making the times to recognize the gestures longer.

  [ CI Train Bot ]
  * No-change rebuild.

ubuntu-ui-toolkit (1.3.1761+16.04.20151216.1-0ubuntu1) xenial; urgency=medium

  [ Zoltán Balogh ]
  * Drop dependency on qtc plugin script and wait for the shell with a local
    function.

  [ Christian Dywan ]
  * runtest.sh needs to add subdirs to the libpath. Fixes: LP: #1524710.
  * Explicit click/ touch threshold beyond handler.
  * Enter/Return/Space should trigger() Button. Fixes: LP: #1523794.
  * Only set ppmm in SwipeArea if screen has valid dpi. Fixes: LP: #1525174.

  [ Tim Peeters ]
  * Implement header slot management for convergence:
    - Adapt the number of action slots to the width of the view.
    - When a new action appears, show a quick fade-in.
    - Reverse the order of the actions in the header.
    - Update icon width to 4GU. Fixes: LP: #1428757.
  * To prevent an invalid sectionIndex, reset the value of sectionIndex to -1
    when the model of Sections is changed. Fixes: LP: #1513933.

  [ Loïc Molinari ]
  * UbuntuShape - Cleaned up includes.

  [ Albert Astals Cid ]
  * Simplify logic for emitting draggingChanged/pressedChanged
    No need for a switch that considers the possible cases, just store the
    status before and check after
    Fixes an issue in which the SwipeArea pressedChanged signal was not emitted
    if switching directly from WaitingForTouch to Recognized.
  * Fix memory leak in SwipeArea
    SwipeAreaPrivate is not deleted d...

Read more...

Changed in ubuntu-ui-toolkit (Ubuntu RTM):
status: Fix Committed → Fix Released
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.