OSK anchored buttons are difficult to click

Bug #1495118 reported by Matti Rinta-Nikkola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Triaged
High
Cris Dywan

Bug Description

As described on document "ubuntu-screen-keyboard-tricks", see the link below, you can anchor action buttons to OSK so that they will remain visible above the OSK. However at the moment it is practically impossible to click them because they fall down too quickly with OSK. Either you do a very very fast click or place your finger over the button and after OSK has disappeared slide your finger again over the button and finally release it. Aren't these action buttons meant to be click-able when they are above OSK? Now in practice they aren't.

A small sample app with OSK action button to demonstrate the problem...
https://code.launchpad.net/~matti-rintanikkola-d/+junk/osk-button-bug

https://developer.ubuntu.com/en/apps/qml/tutorials/ubuntu-screen-keyboard-tricks/

Revision history for this message
Matti Rinta-Nikkola (matti-rintanikkola-d) wrote :

I think the bug has similarities with the bug #1486008 "[sdk] leading actions width is too small making it very difficult to press"

Michael Sheldon (michael-sheldon) wrote on 2015-09-11:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1486008/comments/13

This is because the hiding animation starts when the area is pressed, but the action is only triggered on release. Due to a quirk in QML's mouse areas release event don't get emitted if the finger is no longer inside the relevant mouse area when the release happens (in this case caused to the mouse area having been moved by the hiding animation). So the release event is never emitted and the action isn't triggered.

Revision history for this message
Matti Rinta-Nikkola (matti-rintanikkola-d) wrote :

As a work around the bug can be resolved as follows (without click sound):

       Button {
            id: createButton
            text: "Create Account"

            anchors {
                horizontalCenter: parent.horizontalCenter
                bottom: parent.bottom
                margins: units.gu(2)
            }
            onClicked: {
                if(!oskVisible){
                    popupMessage("onClicked","You have clicked button...")
                }
            }
        }
        onStateChanged:{
            if (createButton.pressed && oskVisible){
                popupMessage("onStateChanged","You have clicked button...")
            }
        }
        states: [
            State {
                name: "pressed"
                when: createButton.pressed
            }
        ]
    }

    Connections {
        target: Qt.inputMethod
        onVisibleChanged: {
            oskVisible=!oskVisible
            console.log('oskVisible: '+oskVisible)
        }
    }

Revision history for this message
Zsombor Egri (zsombi) wrote :

Matti, these two bugs have nothing in common. The reason the OSK disappears is due to Button taking focus when pressed, thus OSK is automatically removed. Whilst there is a discussion on when to gain the focus (on pressed or on released, depending on the previous focused item's type, i.e. text input) a better workaround is to simply disable focusing on the anchored buttons setting autoFocusOnTap: false.

tags: added: convergence-focusing
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Christian Dywan (kalikiana)
importance: Medium → High
Revision history for this message
Matti Rinta-Nikkola (matti-rintanikkola-d) wrote :

Egri, you probably meant the property activeFocusOnPress and not autoFocusOnTap. I do not know which is designed behaviour of the OSK button clicks. Anyhow I would like to see OSK disappear when I do click OSK button exactly what is the behaviour of my work around. In your suggested work around the OSK remains visible.

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.