Skip to content

Commit

Permalink
Fix ANR when opening project with searchbar focus
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasMizera committed May 24, 2024
1 parent 38fe87a commit 92e08bb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/qml/project/MMProjectHomeTab.qml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ Item {
}

onOpenProjectRequested: function( projectFilePath ) {

//
// There was an issue when closing the projects controller while having the searchbar textField focused
// (not neccessarily with keyboard opened). This is a kind-of workaround and hotfix.
// It might be related to https://bugreports.qt.io/browse/QTBUG-123876 as it started
// to occur more frequently when we upgraded to Qt 6.6.3
//
// See https://github.com/MerginMaps/mobile/issues/3027
//
if ( searchBar.textField.activeFocus ) {
searchBar.textField.focus = false
}

root.openProjectRequested( projectFilePath )
}
onShowLocalChangesRequested: function( projectId ) {
Expand Down
13 changes: 13 additions & 0 deletions app/qml/project/MMProjectServerTab.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,19 @@ Item {
}

onOpenProjectRequested: function( projectFilePath ) {

//
// There was an issue when closing the projects controller while having the searchbar textField focused
// (not neccessarily with keyboard opened). This is a kind-of workaround and hotfix.
// It might be related to https://bugreports.qt.io/browse/QTBUG-123876 as it started
// to occur more frequently when we upgraded to Qt 6.6.3
//
// See https://github.com/MerginMaps/mobile/issues/3027
//
if ( searchBar.textField.activeFocus ) {
searchBar.textField.focus = false
}

root.openProjectRequested( projectFilePath )
}
onShowLocalChangesRequested: function( projectId ) {
Expand Down

1 comment on commit 92e08bb

@inputapp-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS - version 24.5.624111 just submitted!

Please sign in to comment.