Closed Bug 305872 Opened 19 years ago Closed 19 years ago

Calling .focus() on a xul textbox focuses nothing.

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ria.klaassen, Assigned: aaronlev)

References

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050824 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20050824 Firefox/1.6a1

File > New Tab doesn't put the cursor in the locationbar of the new tab.

Not in branch.

Working build: 1.9a1_2005082306 
Failing build: 1.9a1_2005082313 


Reproducible: Always

Steps to Reproduce:
1. Click File > New Tab


Actual Results:  
The focus is not in the locationbar of the new tab
*** Bug 305874 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Clicking New Tab doesn't place the cursor in the locationbar of the new tab [trunk] → Clicking New Tab doesn't place the cursor in the location bar of the new tab [trunk]
Keywords: regression
OS: Windows XP → All
Hardware: PC → All
*** Bug 305895 has been marked as a duplicate of this bug. ***
*** Bug 305895 has been marked as a duplicate of this bug. ***
Severity: normal → major
Confirmed w/ Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1)
Gecko/20050825 Firefox/1.6a1
Dup of bug 305840?  (Both recent regressions involving focus.)
Depends on: 305840
It's also not possible to switch to the location bar using Ctrl + L, if the
location bar is empty. With any sign in it, it works absolutely fine.

Bruno
*** Bug 306057 has been marked as a duplicate of this bug. ***
OK, so the reason that this works when the location bar has text is that ^L
calls both focus() and select() and select() forces a focus but only where there
is text.

However, this won't work in other cases that move focus. The most obvious is any
textbox with an accelerator, e.g. Alt+A for the location bar (but not while
reading this bug, obviously).

Additionally, if the textbox is in an iframe, e.g. in Suite's Preferences
window, then the focus will be set to the iframe itself (as you will discover by
pressing tab or shift tab).
Assignee: location-bar → aaronleventhal
Component: Location Bar → Keyboard: Navigation
QA Contact: keyboard.navigation
Summary: Clicking New Tab doesn't place the cursor in the location bar of the new tab [trunk] → Calling .focus() on a xul textbox focuses nothing.
Bug 303620 is the obvious culprit. A XUL textbox captures its focus event in
order to focus its inner input, however that's failing for some reason.
Bug 305840 just went in, so my guess is that this is fixed.
This bug is fixed for me now.
(In reply to comment #11)
> This bug is fixed for me now.

Confirming
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.