Closed Bug 252352 Opened 20 years ago Closed 19 years ago

cannot position caret in search bar text with mouse, selects all on click

Categories

(Thunderbird :: Mail Window Front End, defect)

x86
All
defect
Not set
trivial

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird1.1

People

(Reporter: tuukka.tolvanen, Assigned: mscott)

References

Details

(Whiteboard: [patch])

Attachments

(3 files, 5 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040718 Firefox/0.9.1+
Build Identifier: linux thunderbird aviary 2004-07-20-18Z

Cannot position caret in search bar text with mouse, instead it selects all of
the text in it on every click. Arguably it should select all on focus, although
the location and search bars in firefox don't, at least on linux.

Reproducible: Always
Steps to Reproduce:
1. view > toolbars > search bar, in case it was hidden
2. type text into search textfield
3. try to position caret into text by clicking
Actual Results:  
selects all text in search field

Expected Results:  
position caret to clicked position in search field text
> the text in it on every click. Arguably it should select all on focus, although
> the location and search bars in firefox don't, at least on linux.

...that is, they do on focus by keynav, not on focus by mouse click.
OS -> ALL

Seeing this on Windows XP.
OS: Linux → All
I have fixed this problem so that it behaves identically to the browser URL bar.
I will attach the patch in a while.
The only questionable thing I see about this patch is that the setting is not a
pref as it is in the browser, but I think it would be an extremely minor issue
to not be able to control whether the first click selects the text or not.
Target Milestone: --- → Thunderbird0.8
*** Bug 228112 has been marked as a duplicate of this bug. ***
Whiteboard: [patch]
this patch isn't for thunderbird it's for the suite. 
Target Milestone: Thunderbird0.8 → Thunderbird0.9
Well, I tried to find a Thunderbird branch, but I didn't see one. The developer
pages on mozilla.org have no mention of such a beast. Where is it and I will
make a patch. Then someone needs to update the developer pages.
Plus LXR shows only one file for searchbar.js and mailoverlaywindow.xul. Are
there hidden ones somewhere else that LXR doesn't know about?
I followed the instructions at
http://www.mozilla.org/projects/thunderbird/build.html and still get the same
files. WTF?
mozilla\mail\base\content\searchBar.js
mozilla\mail\base\content\mailWindowOverlay.xul

Those are the files I patched against.
no your patch is against the seamonkey files in mailnews. That's not where the
thunderbird UI lives. That's where the seamonkey UI lives. I didn't list two
files in mailnews :)
Tried to pull mail/ and I get:

mozilla/client.mk(92) : fatal error U1033: syntax error : '=' unexpected
*sigh* did you read the build instructions?

www.mozilla.org/projects/thunderbird/build.html

*BIGGER SIGH* That's HOW I ran into the error.
D:\Mozilla>cvs co mozilla/client.mk mozilla/mail/config
cvs checkout: Updating mozilla/mail/config

D:\Mozilla>nmake -f mozilla/client.mk pull_all

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

mozilla/client.mk(92) : fatal error U1033: syntax error : '=' unexpected
Stop.
Attached patch Patch against Thunderbird source (obsolete) — Splinter Review
Had to manually check out each file. client.mk for Thunderbird is broken.
Attachment #155944 - Attachment is obsolete: true
Argh. Flex=5 in my 20040807 build, but now it's flex=1.
Attached patch Once more... (obsolete) — Splinter Review
Attachment #156066 - Attachment is obsolete: true
Attached patch Is it right... (obsolete) — Splinter Review
Maybe I'll get the patch up-to-date before the spam police come knocking at my
door.
Attachment #156067 - Attachment is obsolete: true
Attached patch Newest (obsolete) — Splinter Review
Stop me before I patch again
Attachment #156068 - Attachment is obsolete: true
This has been tested by applying it to the Thunderbird tree. Modified function
names to be inline with naming conventions in searchBar.js, and fixed the
onSearchInputFocus() function.

It should now be fully ready. I am testing this patch on my local build and
haven't seen any issues.

Sorry for all the spam as I figure out this thing.
Attachment #156079 - Attachment is obsolete: true
Forgive my questions, but I am new to this.

I know how to read a preference, and write a preference, but what is the proper
way to create a new preference? I have a patch that reads a boolean preference
called mail.searchbar.clickSelectsAll, and that is working fine. I just don't
know the proper procedure for creating a new preference in Thunderbird. Is it as
simple as creating a default value, adding an entry to thunderbird.js, and then
setting up the code to read the pref?
What I mean, is how do you get it so that Thunderbird is aware of this
preference and know its default value if it does not exist in prefs.js?
Take your pick...pref or no pref
Attachment #156124 - Flags: review?(mscott)
I haven't had a chance to play around with this patch yet. Still fighting lots
of focus issues with the search box so I'm loathe to take on more risk for that
right now. May move this back to 1.0 after 0.9 is done if I have time.
Status: NEW → ASSIGNED
Target Milestone: Thunderbird0.9 → Thunderbird1.1
*** Bug 256666 has been marked as a duplicate of this bug. ***
I simplified a couple things from the original patch.
Attachment #156124 - Flags: review?(mscott)
fix checked in. thanks for the patch!
Status: ASSIGNED → NEW
I'm afraid I'm mystified by LXR.  Did this make it into the suite?
(see bug 283961).

I do see it fixed in today's TB build.
*** Bug 274047 has been marked as a duplicate of this bug. ***
Mike: suite doesn't use mail/base that I know of, it still uses mailnews.

However, TB uses mailnews/base, afaik.
i forgot to mark this fixed
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: