Skip to content

Commit

Permalink
Fix search bar selection when coming back to the app (#3065)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/414709148257752/1207736781372157/f
Tech Design URL:
CC:

Description:

Fix Selection when on the serp anc coming back to the app.

Steps to test this PR:

Press fire button.
Ensure the URL bar is selected and keyboard is up.
Leave the app for 6s.
Come back to the app - search for something.
Tap on search bar - text should not be selected, cursor should be at the end.
Hide keyboard, then background the app for 6s.
Come back to the app -> tap on search bar. Whole text should be selected.
Dismiss keyboard, tap on search again. Text should not be selected.
Navigate to non-serp page.
Tap on the url - it should be selected.
  • Loading branch information
bwaresiak authored Jul 10, 2024
1 parent 27d649b commit 9b5d747
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ class MainViewController: UIViewController {
currentTab?.url?.absoluteString ?? "<nil>")
return
}
// Make sure that once query is submitted, we don't trigger the non-SERP flow
skipSERPFlow = false
loadUrl(url)
}

Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@
/* Alert action for starting a file dowload */
"downloads.alert.action.save-to-downloads" = "Save to Downloads";

/* Cancel download action for alert when trying to cancel the file download */
/* Cancel download action for downloads */
"downloads.cancel-download.alert.cancel" = "Cancel";

/* Message for alert when trying to cancel the file download */
Expand Down

0 comments on commit 9b5d747

Please sign in to comment.