OSK should be closed before removing page from PageStack

Bug #1492769 reported by Matti Rinta-Nikkola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-keyboard (Ubuntu)
New
Undecided
Michael Sheldon
ubuntu-ui-toolkit (Ubuntu)
Invalid
Undecided
Tim Peeters

Bug Description

Hello, I think I have found a bug from PageStack component, see

https://bugs.launchpad.net/my-webapp-group/+bug/1490493

I have produced a small app where the bug can be easily reproduced

https://code.launchpad.net/~matti-rintanikkola-d/+junk/radial-buttom-edge-bug

Reproduce fault:
1) Open "Page2" page from Root page by clicking radial action icon "Home"
2) click website title/url field in order to open keyboard view
3) without closing the keyboard turn back to the main view
4) the main view will be opened without radial actions edge button

Analysis: The visibility of the main view radial edge button is toggled by using the connection

    Connections {
        target: Qt.inputMethod
        onVisibleChanged: nav.visible = !nav.visible
    }

If you do not close the keyboard when turning back to the Root page from "Page2" page the main view became visible before the signal onVisibleChanged is fired and when it will be fired the radial edge button becomes invisible.

Solution?: Before removing the page from pageStack it should be ensured that the keyboard is not visible. Maybe this could be achieved simply by adding a function call Qt.inputMethod.hide() before removing the page from pageStack.

Regards,

Matti

Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Christian Dywan (kalikiana)
assignee: Christian Dywan (kalikiana) → Tim Peeters (tpeeters)
Revision history for this message
Matti Rinta-Nikkola (matti-rintanikkola-d) wrote :

As a work around the bug can be resolved by overriding the default PageStack back button:

    head.backAction: Action {
        iconName: "back"
        onTriggered: {
            Qt.inputMethod.hide()
            myTimer.delay(pageStack.pop, 500)
        }
    }

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

This is somehow not related to the PageStack or whatever. Recently the OSK does;'t disappear in some cases when the app is closed either! So it's rather OSK than PageStack issue.

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

Every button press by default grabs the active focus. Therefore OSK should disappear in any case. if OSK stays still, this is OSK issue.

Changed in ubuntu-keyboard (Ubuntu):
assignee: nobody → Michael Sheldon (michael-sheldon)
Revision history for this message
Matti Rinta-Nikkola (matti-rintanikkola-d) wrote :

OSK does disappear but the page where OSK has been activated is removed before OSK signals visibleChanged(). As a result the signal is captured on page where OSK has not been activated. The same will happen if you simply after Qt.inputMethod.hide() put pageStack.pop() without setting a time delay.

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

OSK is removed by the Qt's TextInput or TextEdit components losing focus. Those lose focus also when the component is deleted or made invisible. As OSK and the UI are running in separate threads, it is obvious that you will receive the signal after the page has been closed.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Invalid
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.