brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 441 forks source link

Fix #8374: Cursor is misplaced for a selected URL when that URL doesn't fit the screen #8612

Closed soner-yuksel closed 9 months ago

soner-yuksel commented 9 months ago

Summary of Changes

Selection with text range instead of select all handles tghe case when text is bigger than textfield problems

This pull request fixes #8374

Submitter Checklist:

Test Plan:

  1. Launch Brave
  2. Open any website with a long URL, for example, https://www.apple.com/shop/buy-iphone/carrier-offers or https://en.m.wikipedia.org/wiki/National_Organization_for_the_Reform_of_Marijuana_Laws
  3. Tap on the URL search bar > Observe

Screenshots:

https://github.com/brave/brave-ios/assets/6643505/5b05f2c7-9bbb-4da4-8fc3-ab1e0fa92268

Reviewer Checklist: