Skip to content

Fix no blinking cursor on searchfield

Eamonn Rea requested to merge eamonnrea/discover:search-focus into master

Alternative implementation of !38 (closed) that aims to address concerns on that MR.

Currently, the searchField in globalDrawer is selected but does not have a blinking cursor or other indication that it is selected. This is a result of Kirigami.ApplicationWindow's behaviour. When the pageStack has a currentItem, this is set to have the active focus, thus stealing it from the searchField. See the following lines in Kirigami's ApplicationWindow.qml.

To my understanding, this implementation should always run after the pageStack has been updated, as it calls to searchField.forceActiveFocus() after the currentTopLevel item has been pushed, hopefully addressing the concerns in !38 (closed) by making a somewhat more direct fix to when we set the focus. 😄

Currently this focus force is implemented by calling a function within DiscoverDrawer.qml that I created to replace the Component.onCompleted signal.

Any feedback on this MR would be much appreciated, I'm still new to contributing and wanted to try my hand at fixing this bug.

BUG: 417213

Merge request reports

Loading