Last Comment Bug 464084 - Clicking Search button in search bar highlights the default text (browser.urlbar.clickSelectsAll = true)
: Clicking Search button in search bar highlights the default text (browser.url...
Status: VERIFIED FIXED
: regression, verified1.9.1
Product: Toolkit
Classification: Components
Component: XUL Widgets (show other bugs)
: 1.9.1 Branch
: All All
: -- normal with 1 vote (vote)
: mozilla1.9.2a1
Assigned To: Dão Gottwald [:dao]
:
Mentors:
Depends on:
Blocks: 288194
  Show dependency treegraph
 
Reported: 2008-11-10 12:32 PST by Shayne Jewers
Modified: 2010-12-17 06:44 PST (History)
11 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (726 bytes, patch)
2008-12-10 10:23 PST, Dão Gottwald [:dao]
enndeakin: review+
mbeltzner: approval1.9.1+
Details | Diff | Splinter Review

Description Shayne Jewers 2008-11-10 12:32:29 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081110 Minefield/3.1b2pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b2pre) Gecko/20081110 Minefield/3.1b2pre

"Google" (or whatever default text is in there) becomes highlighted when you click the search button, the first time you do it, without inserting text.

Reproducible: Always

Steps to Reproduce:
1.Click the search button in the search bar.

Actual Results:  
"Google" (or whatever text is in there) becomes highlighted

Expected Results:  
The text shouldn't be highlighted.
Comment 1 Luke Iliffe (Harlequin99) 2008-11-12 06:11:28 PST
Confirmed on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081111 Minefield/3.1b2pre 

However I can only reproduce this on initial browser startup. Once the search button has been clicked once I cannot reproduce the issue.
Comment 2 hhh 2008-11-12 08:10:29 PST
Regression is between the Sep 27 and Sep 28 nightly builds.

Comment 1 is incorrect, this behavior continues until the search <em>field</em> is clicked once.
Comment 4 Shayne Jewers 2008-11-12 13:30:17 PST
hmm, my guess us Bug 457353 did it. Might be wrong though.
Comment 5 Shayne Jewers 2008-11-22 18:42:03 PST
this seems to have been fixed now?
Comment 6 hhh 2008-11-24 08:42:57 PST
Yes, confirmed re: comment #5. This bug can be closed.
Comment 7 hhh 2008-11-24 09:59:26 PST
re: comment #6, sorry, I'm still seeing this...

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081124 Minefield/3.1b2pre
Comment 8 Shayne Jewers 2008-11-24 10:29:30 PST
oh, whoops. yeah I can still see it. ccing justin wood as well since he worked on bug 457353, and I think that may have caused this.
Comment 9 Justin Wood (:Callek) (Away until Aug 29) 2008-11-26 08:06:53 PST
I would be surprised if Bug 457353 caused this... (I can look into it later if need be) bz any thoughts?
Comment 10 Boris Zbarsky [:bz] 2008-11-26 08:57:33 PST
Yeah, removal of an unused method doesn't seem like a likely culprit here.

That said, nothing in the range jumps out at me.  The simplest approach is to do some hg bisecting here to find the culprit changeset.

Justin, are you willing to do that?
Comment 11 Justin Wood (:Callek) (Away until Aug 29) 2008-11-26 09:58:45 PST
I won't have time for at least a two or three days, but provided I can repro when I get home from work, I am willing to...
Comment 12 Dão Gottwald [:dao] 2008-12-10 06:03:31 PST
not sure about the component... "Selection" seems to be the next best fit to me.
Comment 13 Boris Zbarsky [:bz] 2008-12-10 09:27:09 PST
That mostly depends on whether there's chrome JS calling select().

Still waiting on a regression range.
Comment 14 Dão Gottwald [:dao] 2008-12-10 09:31:34 PST
(In reply to comment #13)
> That mostly depends on whether there's chrome JS calling select().

There is (for Mac and Windows):

http://hg.mozilla.org/mozilla-central/annotate/28f45bf33ba9/toolkit/content/widgets/textbox.xml#l237

http://hg.mozilla.org/mozilla-central/annotate/28f45bf33ba9/toolkit/content/widgets/textbox.xml#l281
Comment 15 Boris Zbarsky [:bz] 2008-12-10 09:35:02 PST
Well, in that case the bug could be in said chrome code or its caller, no?
Comment 16 Boris Zbarsky [:bz] 2008-12-10 09:35:34 PST
As in, this doesn't sound like a bug in the core "manage the ranges that make up the selection and paint the selection" codepaths.
Comment 17 Dão Gottwald [:dao] 2008-12-10 09:43:05 PST
(In reply to comment #15)
> Well, in that case the bug could be in said chrome code or its caller, no?

It could, but then I can't reproduce this on Linux with clickSelectsAll set to true.

I don't see any report that this happens OSX, thus setting OS to Win.
My new guess for the component would be widget: win32...
Comment 18 Dão Gottwald [:dao] 2008-12-10 09:47:36 PST
(In reply to comment #14)
> (In reply to comment #13)
> > That mostly depends on whether there's chrome JS calling select().
> 
> There is (for Mac and Windows):
> 
> http://hg.mozilla.org/mozilla-central/annotate/28f45bf33ba9/toolkit/content/widgets/textbox.xml#l237
> 
> http://hg.mozilla.org/mozilla-central/annotate/28f45bf33ba9/toolkit/content/widgets/textbox.xml#l281

It has to be the "click" event handler that selects the text in this case; if it was the "focus" event, the emptytext would have been cleared already.
Comment 19 Jim Jeffery not reading bug-mail 1/2/11 2008-12-10 10:00:24 PST
For what is worth.. I can no longer repo this using this build changeset:

http://hg.mozilla.org/mozilla-central/rev/9952fee851da

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2a1pre) Gecko/20081210 Minefield/3.2a1pre Firefox/3.0.4 ID:20081210040513
Comment 20 Dão Gottwald [:dao] 2008-12-10 10:08:55 PST
Err, I can actually reproduce this on Linux with the latest trunk nightly.
Comment 21 Dão Gottwald [:dao] 2008-12-10 10:17:08 PST
This is most likely a regression from bug 288194.
Comment 22 Dão Gottwald [:dao] 2008-12-10 10:23:45 PST
Created attachment 352348 [details] [diff] [review]
patch
Comment 23 Dão Gottwald [:dao] 2008-12-11 04:10:18 PST
http://hg.mozilla.org/mozilla-central/rev/138f6ab12c35
Comment 24 Mike Beltzner [:beltzner, not reading bugmail] 2008-12-29 14:58:33 PST
Comment on attachment 352348 [details] [diff] [review]
patch

a191=beltzner
Comment 26 Aakash Desai [:aakashd] 2009-03-03 15:24:58 PST
Verified FIXED on agent:
 
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090302 Shiretoko/3.1b3pre

Note You need to log in before you can comment on or make changes to this bug.