Closed
Bug 895236
Opened 11 years ago
Closed 11 years ago
Cannot select a single search term in the URL bar
Categories
(Firefox for Android Graveyard :: Awesomescreen, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 25
People
(Reporter: mozilla-bugs, Assigned: jchen)
References
Details
Attachments
(1 file)
1.34 KB,
patch
|
sriram
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 Steps to reproduce: (Using Nexus 4 with Google Keyboard.) - Tap the URL bar - Type 2 or more words and press the search key to perform a search - Tap the URL bar again - Try to select a word by long-pressing it Actual results: The whole search is selected, not just the search term under the cursor. Expected results: The word under the cursor should be selected, as happens in every other Android app.
While completely changing the search is a useful function on a mobile device (because opening/closing tabs takes more time), it's also extremely common to modify a search, and word selection is important to do that quickly.
OS: Mac OS X → Android
Hardware: x86 → ARM
Comment 2•11 years ago
|
||
Seeing the steps from Bug 861943 and the steps from this one, which is the expected behaviour? The whole search or only one word of the URL should be selected?
Flags: needinfo?(bugmail.mozilla)
Comment 3•11 years ago
|
||
I don't see any contradiction between that bug and this one. Both bugs are about the ability to select only part of the content of the url entry field. I agree that there should be a way to select individual words in the search query.
Flags: needinfo?(bugmail.mozilla)
Assignee | ||
Comment 4•11 years ago
|
||
Currently, we select all text in the URL bar on long press, but seems like we should have different behaviors for URLs and search terms. For URLs, long press should select the entire URL (rather than a word) because a common usage is to select all and copy the URL. For search terms, long press should only select a word to match Android behavior elsewhere. Do you have an opinion on this, Ian?
Status: UNCONFIRMED → NEW
Component: Text Selection → Awesomescreen
Ever confirmed: true
Flags: needinfo?(ibarlow)
Comment 5•11 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3) > I don't see any contradiction between that bug and this one. Both bugs are > about the ability to select only part of the content of the url entry field. > I agree that there should be a way to select individual words in the search > query. Oh, I totally misread my own bug... Ignore this comment :) What Jim said in comment 4 makes sense.
I agree with Jim's comment 4 as well, though I would clarify that I don't think the initial touch behavior should change--that is, when someone short-presses the URL bar to open the awesome screen, the URL bar should select-all, as is the current behavior.
Comment 7•11 years ago
|
||
(In reply to Jim Chen [:jchen :nchen] from comment #4) > For search terms, long press should only select a word to match Android > behavior elsewhere. > > Do you have an opinion on this, Ian? This makes total sense to me. It'd be a very nice detail to have.
Flags: needinfo?(ibarlow)
Assignee | ||
Comment 8•11 years ago
|
||
Turns out much of the code is there already; just need a one line fix.
Attachment #778517 -
Flags: review?(sriram)
Comment 9•11 years ago
|
||
Comment on attachment 778517 [details] [diff] [review] Bug 895236 - Make URL bar inputType and imeOptions consistent; r= Review of attachment 778517 [details] [diff] [review]: ----------------------------------------------------------------- I don't understand why this patch would work :( I hope this works.
Attachment #778517 -
Flags: review?(sriram) → review+
Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Sriram Ramasubramanian [:sriram] from comment #9) > Comment on attachment 778517 [details] [diff] [review] > Bug 895236 - Make URL bar inputType and imeOptions consistent; r= > > Review of attachment 778517 [details] [diff] [review]: > ----------------------------------------------------------------- > > I don't understand why this patch would work :( > I hope this works. In AwesomeBar.java, we change inputType and imeOptions together to switch between URL mode and search mode. But because of this bug, initially inputType and imeOptions are mismatched, making us treat search terms as URLs initially. This leads to bugs like this where long-pressing in search mode selects the whole text (which is the correct behavior for URL mode).
Comment 11•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/bfe1b9a06403
Keywords: checkin-needed
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/bfe1b9a06403
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 25
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•