Closed Bug 265456 Opened 20 years ago Closed 20 years ago

Still possible to focus textbox in background tab, by using createevent

Categories

(Firefox :: Tabbed Browser, defect)

1.0 Branch
x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: jst)

References

()

Details

(4 keywords, Whiteboard: [sg:fix])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041020 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041020 Firefox/1.0

I see that bug 124750 is fixed on the branch.
But it is still possible to focus a textarea in a background tab, see the URL
testcase. It consists of the following code:
<HTML>
<HEAD>
</HEAD>
<BODY>
<label>text<textarea>evil textarea</textarea></label>
<script>
function doe(){
var x=document.getElementsByTagName('label')[0];
var me = document.createEvent("MouseEvents");
me.initMouseEvent('click',1,1,window,0,0,0,0,0,0,0,0,0,0,x);
x.dispatchEvent(me);
}
setInterval('doe()',1000);
</script>
</BODY></HTML>

Reproducible: Always
Steps to Reproduce:
1. Open the url testcase in a background tab
2. Focus a textbox in this page
3.

Actual Results:  
Watch the caret disappear in one second or less

Expected Results:  
The caret should stay in the textbox.
Also happens with:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041021 Firefox/1.0
Depends on: 124750
Keywords: testcase
OS: Windows 2000 → All
Product: Browser → Firefox
Version: Trunk → 1.0 Branch
Flags: blocking-aviary1.0+
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041021 Firefox/1.0
(daihard: P4/SSE2)

This one is especially bad because it KEEPS stealing focus, even after moving
away from the page. Yuck!
Assignee: tabbed-browser → jst
Status: NEW → ASSIGNED
Attachment #163039 - Flags: superreview?(bryner)
Attachment #163039 - Flags: review?(bryner)
Attachment #163039 - Flags: superreview?(bryner)
Attachment #163039 - Flags: superreview+
Attachment #163039 - Flags: review?(bryner)
Attachment #163039 - Flags: review+
Attachment #163039 - Flags: approval-aviary?
Comment on attachment 163039 [details] [diff] [review]
Plug this hole, and a few others too.

a=asa for aviary checkin.
Attachment #163039 - Flags: approval-aviary? → approval-aviary+
Fixed on the aviary branch.
Keywords: fixed-aviary1.0
evil text area no longer steals focus from other tab/form. as seen on windows
firefox branch build 2004102607
also looks good on linux fc2 2004102609-0.11.
looks good on Mac, too using 2004-10-26-06-0.11/
Whiteboard: need 1.7 fix
Let's not forget (sorry if this was already mentioned) that this affects ALL
input fields.
Landed on the 1.7 branch now too (assuming a=dveditz).
Keywords: fixed1.7.x
Whiteboard: need 1.7 fix
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050112
Firefox/1.0+

WFM

shouldn't this be RESOLVED/FIXED ?
Whiteboard: [sg:fix] need trunk?
This appears to have landed on the trunk 2004-11-04
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [sg:fix] need trunk? → [sg:fix]
QA Contact: tabbed.browser
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: