Closed
Bug 6133
Opened 26 years ago
Closed 23 years ago
[FIX][DEPEND]<input type="file"> control: Doesn't respond to focus() call
Categories
(Core :: XUL, defect, P1)
Tracking
()
RESOLVED
WORKSFORME
Future
People
(Reporter: cmanske, Assigned: rods)
References
Details
(Whiteboard: Fix in hand)
Attachments
(2 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
The JavaScript focus() method should place the keyboard focus in the input edit
field, as it does for <input type="text">
I haven't tested other JavaScript methods, but they probably should be
investigated as well.
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M7
Updated•26 years ago
|
Target Milestone: M7 → M9
Updated•26 years ago
|
Assignee: kmcclusk → evaughan
Status: ASSIGNED → NEW
Comment 1•26 years ago
|
||
Eric, I'm re-assigning this to you since your working on this form element.
Updated•26 years ago
|
Target Milestone: M9 → M11
Updated•25 years ago
|
Target Milestone: M11 → M12
Comment 2•25 years ago
|
||
mass-moving all m12 bugs to m13
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 3•25 years ago
|
||
giving me rest of phillips open qa contact bugs, sorry for spam
Updated•25 years ago
|
Target Milestone: M13 → M14
Comment 4•25 years ago
|
||
pushing to m14
Updated•25 years ago
|
Target Milestone: M14 → M15
Comment 5•25 years ago
|
||
*IGNORE* - massive spam changing open XPToolkit bug's QA contact to
jrgm@netscape.com
QA Contact: paulmac → jrgm
Comment 6•25 years ago
|
||
Rod this is an html control.
Assignee: evaughan → rods
Status: ASSIGNED → NEW
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•25 years ago
|
||
fixed.
Comment 8•24 years ago
|
||
I can't get filecontrol.focus() to work, but should it work? Allowing it would
make exploits easier.
If it's not supposed to work, it should fail completely instead activating the
window or losing the focus if the window is already active, which is what it
does now.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 9•24 years ago
|
||
Assignee | ||
Comment 10•24 years ago
|
||
This got broken when they turned on the new GfxTextControl.
Here is the fix:
Index: nsFileControlFrame.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/forms/src/nsFileControlFrame.cpp,v
retrieving revision 3.96
diff -u -r3.96 nsFileControlFrame.cpp
--- nsFileControlFrame.cpp 2000/09/13 23:52:43 3.96
+++ nsFileControlFrame.cpp 2000/10/11 18:50:18
@@ -214,8 +214,13 @@
void
nsFileControlFrame::SetFocus(PRBool aOn, PRBool aRepaint)
{
+ // Fix for Bug 6133
if (mTextFrame) {
- mTextFrame->SetFocus(aOn, aRepaint);
+ nsCOMPtr<nsIContent> content;
+ mTextFrame->GetContent(getter_AddRefs(content));
+ if (content) {
+ content->SetFocus(mPresContext);
+ }
}
}
Status: REOPENED → ASSIGNED
Summary: <input type="file"> control: Doesn't respond to focus() call → [FIX]<input type="file"> control: Doesn't respond to focus() call
Whiteboard: Fix in hand
Assignee | ||
Updated•24 years ago
|
Target Milestone: M15 → Future
Comment 11•24 years ago
|
||
Fix looks good
r=kmcclusk@netscape.om
Comment 12•24 years ago
|
||
sr=waterson
Assignee | ||
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
It might be a good idea to hold this patch until bug 57770 is fixed. Being
able to focus the field makes it slightly easier to exploit a more general
security hole involving file upload controls. (Bug 56236 shows an exploit that
*mostly* gets around the annoyance of not being able to focus the control.)
Assignee | ||
Comment 15•24 years ago
|
||
I'll wait and check it in when the dependency clears - thanks for the heads up
Assignee | ||
Updated•24 years ago
|
Summary: [FIX]<input type="file"> control: Doesn't respond to focus() call → [FIX][DEPEND]<input type="file"> control: Doesn't respond to focus() call
Assignee | ||
Updated•24 years ago
|
Priority: P3 → P1
Target Milestone: Future → ---
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → Future
Comment 16•24 years ago
|
||
This works for me.
Can we mark it resolved?
Comment 17•23 years ago
|
||
marking worksforme.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 23 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•