Closed Bug 1136219 Opened 9 years ago Closed 9 years ago

Hide the URL bar carets upon entering the Awesomescreen

Categories

(Firefox for iOS :: Browser, defect)

All
iOS 8
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1166116

People

(Reporter: bnicholson, Assigned: st3fan)

References

Details

Attachments

(1 file)

When we do the initial URL text selection upon entering the AwesomeScreen, carets show up on either side of the selection, which is ugly. If we don't want to show them, one option would be to use NSAttributedString to create the same highlighting effect (which Stefan used in his patch for bug 1109656).
Summary: Use NSAttributedString for URL selection to hide the carets → Hide the carrots upon entering the Awesomescreen
This patch introduces a AutocompleteTextField.selectAll() method and calls that when you enter the Awesome Screen. This results in the initial text being selected as in Safari: with the text highlighted but without the carrots. You can immediately start typing over the text.
Attachment #8594874 - Flags: review?(bnicholson)
lolautocorrect
Assignee: nobody → sarentz
Status: NEW → ASSIGNED
Summary: Hide the carrots upon entering the Awesomescreen → Hide the URL bar carets upon entering the Awesomescreen
Comment on attachment 8594874 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/354

Looks pretty good, but I found that the autocomplete highlight can get "stuck" on the text. STR:

1) Click the URL bar.
2) Click Cancel without typing any text.
3) Click the URL bar again.
4) Type some text.
Attachment #8594874 - Flags: review?(bnicholson) → feedback+
Brian, I've looked at this, but there is a lot of confusing state in the code. If you know a quick solution, feel free. Otherwise I am not going to spend time on this right now because we have higher priority items.
Comment on attachment 8594874 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/354

(In reply to Stefan Arentz [:st3fan] from comment #4)
> Brian, I've looked at this, but there is a lot of confusing state in the
> code. If you know a quick solution, feel free. Otherwise I am not going to
> spend time on this right now because we have higher priority items.

Hm, might be an iOS bug. I added logging to verify that the most recent attributedText being set does *not* have a background color, yet the background color still persists. We can explicitly set a clear background color to force it to be removed -- work for you? Works for me if so!
Flags: needinfo?(sarentz)
Attachment #8594874 - Flags: feedback+ → review+
I meant to mention that I added this change to the PR (https://github.com/mozilla/firefox-ios/commit/2143242b261e994e2c1249e3da55dfc51449afb7) if you want to take a look/test it out.
Oh interesting that you think this is an iOS bug. That would explain why I was so confused about the highlight staying there. The patch/workaround looks good to me.
Flags: needinfo?(sarentz)
I can still reproduce the behaviour you mentioned in comment #3 - Will take a peek again later.
Fixed by bug 1166116.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: