Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Make Find Previous / Find Next buttons initially disabled
Browse files Browse the repository at this point in the history
When the user hasn't entered any text, the previous/next buttons were
not made disabled, which could be a little bit misleading and was not
consistent with the case where there are no search results.
  • Loading branch information
sryze committed Feb 9, 2024
1 parent ec5f63a commit aac944d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions focus-ios/Blockzilla/Utilities/FindInPageBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ class FindInPageBar: UIView {
previousButton.accessibilityLabel = UIConstants.strings.findInPagePreviousLabel
previousButton.addTarget(self, action: #selector(didFindPrevious), for: .touchUpInside)
previousButton.accessibilityIdentifier = "FindInPage.find_previous"
previousButton.isEnabled = false
addSubview(previousButton)

nextButton.setImage(.findNext, for: [])
nextButton.setTitleColor(.white, for: [])
nextButton.accessibilityLabel = UIConstants.strings.findInPageNextLabel
nextButton.addTarget(self, action: #selector(didFindNext), for: .touchUpInside)
nextButton.accessibilityIdentifier = "FindInPage.find_next"
nextButton.isEnabled = false
addSubview(nextButton)

let closeButton = UIButton()
Expand Down

0 comments on commit aac944d

Please sign in to comment.