Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] - Fix URL-Bar typing when the URL belongs to a bookmark #26359

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ios/brave-ios/Sources/Shared/URIFixup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,16 @@ public class URIFixup {
return nil
}

if match.type == .urlWhatYouTyped {
if [.bookmarkTitle, .historyUrl, .openTab, .urlWhatYouTyped].contains(match.type) {
return match.destinationURL
}

if match.type == .searchWhatYouTyped {
// Technically we should be returning `destinationURL` here.
// But if the user's default search engine is `Google`, then `destinationURL` will be `BraveSearch`!
// That's because we don't use Chromium's `SearchEngine` shared in Brave-Core, and we use our own!
// If we ever refactor to use the SearchEngine logic from Brave-Core, we can safely return `destinationURL` here,
// and get rid of ALL of the above code entirely.
return nil
}

Expand Down
Loading