Closed Bug 240111 Opened 21 years ago Closed 20 years ago

Re-focus text input after clicking URL

Categories

(Other Applications Graveyard :: ChatZilla, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: carloscm, Assigned: rginda)

Details

(Whiteboard: [cz-patch][cz-0.9.68])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 If you click an URL in Chatzilla, the program will remember the cursor position in the channel window, not on the text field. So even if you use ALT+TAB to return to Chatzilla, you still have to bother using the mouse to click the text field, so you can talk about the URL. Happens also if you do "whois" and "version" using the mouse. Quite iritating really. Reproducible: Always Steps to Reproduce: 1. Click an URL 2. Type something back in chatzilla 3. Actual Results: Chatzilla will look for URLs with the typed letters Expected Results: Chatzilla should allow typing of text in the text field
> you still have to bother using the mouse to click the text > field Or you could smack "esc", which focuses the input box.
Hmm. I remember at one point ChatZilla would re-focus the text input automatically, but it caused problems and was changed to Linux-only... now it seems it doesn't do it at all. rginda, you remember what the actual issues were with this? Someone suggested on #chatzilla earlier that we could re-focus the input if the chat area got any non-modified keys (i.e. no Ctrl/Alt/Meta flags), presumably chucking the triggering event at it too so we don't lose one character. This obviously removes (assuming it was captured at the right level) the ability to do Find As You Type, but I consider that a benifit myself.
ChatZilla used to focus the input box whenever you clicked in the message area, but that broke copy/paste on windows and mac. Some people seem to like type-ahead-find in chatzilla, I don't understand them. If you can make the focus change happen, without dropping the key event, I think it would be cool. But my intuition is that it's going to be difficult to get right. Another alternative is to make the goto-url-* commands dispatch a "focus-input" after they go the the url.
Attached patch Patch (obsolete) — Splinter Review
Comment on attachment 152163 [details] [diff] [review] Patch as a general rule, you should never call the cmd* functions directly, without a good reason, instead, use dispatch("focus-input"); This makes it possible for someone to override focus-input, for example, and also makes sure the event object is correct. You also never want to re-use an event object without good reason. In your case, the event you're passing to focus input would have an e.command equal to one of the goto-url- commands. In this particular case, that's no bug deal, but sometimes it matters.
Product: Core → Other Applications
David, want to update this patch? :)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Auto-Write Text after URL clicking → Re-focus text input after clicking URL
Attached patch Patch v2Splinter Review
Fixing Toast's patch for review :-).
Attachment #152163 - Attachment is obsolete: true
Attachment #178412 - Flags: review?(samuel)
Attachment #178412 - Flags: review?(samuel) → review+
Whiteboard: cz-patch
Attachment #178412 - Flags: approval1.8b2?
Comment on attachment 178412 [details] [diff] [review] Patch v2 a=asa
Attachment #178412 - Flags: approval1.8b2? → approval1.8b2+
Checked in --> FIXED. Automated builds at http://twpol.dyndns.org/mozilla/chatzilla/nightly/ will include this shortly.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: cz-patch → [cz-patch][cz-0.9.68]
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: