Skip to content

Commit

Permalink
Add overlay mode for paste a11y action (#21520)
Browse files Browse the repository at this point in the history
  • Loading branch information
PARAIPAN9 authored Aug 13, 2024
1 parent 2b320d5 commit cc9a004
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,11 @@ class BrowserViewController: UIViewController,
pasteAction = AccessibleAction(name: .PasteTitle, handler: { [weak self] () -> Bool in
guard let self, let pasteboardContents = UIPasteboard.general.string else { return false }
// Enter overlay mode and make the search controller appear.
overlayManager.openSearch(with: pasteboardContents)
if isToolbarRefactorEnabled {
addressToolbarContainer.enterOverlayMode(pasteboardContents, pasted: true, search: true)
} else {
overlayManager.openSearch(with: pasteboardContents)
}
searchController?.searchTelemetry?.interactionType = .pasted
return true
})
Expand Down

0 comments on commit cc9a004

Please sign in to comment.