Closed
Bug 176100
Opened 22 years ago
Closed 22 years ago
tabbing out of file upload form control highlights text area contents
Categories
(Core :: Layout: Form Controls, defect, P2)
Core
Layout: Form Controls
Tracking
()
RESOLVED
FIXED
mozilla1.3alpha
People
(Reporter: blizzard, Assigned: aaronlev)
References
(Blocks 1 open bug)
Details
(Keywords: access, testcase)
Attachments
(3 files, 3 obsolete files)
242 bytes,
text/html
|
Details | |
1.04 KB,
patch
|
john
:
review+
bzbarsky
:
superreview+
roc
:
approval+
|
Details | Diff | Splinter Review |
2.33 KB,
patch
|
john
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
Steps to reproduce: 1. Open a bugzilla attachment page 2. Give focus to the file upload form control with the mouse 3. Type something into the file upload form text area 4. Hit tab Current behaviour: Contents of the control are selected. Expected behaviour: Focus is given to the file selector button.
Assignee | ||
Comment 1•22 years ago
|
||
This must be a regression due to my fix for bug 28583. Who's forms@layout.bugs? I'll look into this if you want.
Assignee | ||
Comment 2•22 years ago
|
||
There turned out to be a bug in the focus system related to file controls that caused this. When you tab to a button, esm::SendFocusBlur() generates a focus event on the button, which bubbles up to the file control, which gets focused, which turns around and focuses the textfield! This causes 2 other problems than the 1 in this bug: * when tabbing forward through a file control, the button becomes "half" focused, and the text field becomes half focused. * when tabbing backward into a file control, it would skip the button and go straight to the textfield. Marking sec508, access because of the focus problems.
Assignee | ||
Comment 3•22 years ago
|
||
Seeking r=jkeiser, sr=bryner
Assignee | ||
Comment 4•22 years ago
|
||
This also fixes bug 132557 and bug 141310
Assignee | ||
Comment 5•22 years ago
|
||
This shows that tabbing, reverse tabbing, script focus and all work correctly. You can even click-drag on the "browse" button to focus it.
Comment 6•22 years ago
|
||
Comment on attachment 104025 [details] [diff] [review] When file control gets bubbling focus event, don't focus text field, because it might be bubbling up from the button + formControlFrame->GetType(&formControlType); Um... how about just checking mType directly and skipping out on the three virtual calls (to the frame, to the helper, and back to this content node)? Alternately, you could use "type", which is in scope here and was gotten above.. but I think that code should die and just check mType too. ;)
Comment 8•22 years ago
|
||
Comment on attachment 104219 [details] [diff] [review] Uses variable "type" instead of getting it off the form control frame -- duh, thanks r/sr=bzbarsky if you reinstate that comment saying why the check is needed from the earlier patch (no need for new patch for that).
Attachment #104219 -
Flags: superreview+
Comment 9•22 years ago
|
||
Comment on attachment 104219 [details] [diff] [review] Uses variable "type" instead of getting it off the form control frame -- duh, thanks r=jkeiser
Attachment #104219 -
Flags: review+
Comment on attachment 104219 [details] [diff] [review] Uses variable "type" instead of getting it off the form control frame -- duh, thanks a=roc+moz for trunk
Attachment #104219 -
Flags: approval+
Assignee | ||
Comment 11•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 12•22 years ago
|
||
The code needs set the focus to the inner text field when the form element receives a focus event. Now the old code used a hack to prevent it recursively setting the focus when the text field's focus event bubbled up to the form element. However the new code explicitly ignores these bubbled events and therefore the old hack is no longer required.
Assignee | ||
Comment 13•22 years ago
|
||
Great, I just checked this in last night for 1.2 -- you're saying that was wrong? It seemed to work fine in my tests. Can you explain what my code does wrong?
Assignee | ||
Comment 14•22 years ago
|
||
I see -- you're saying now with the new bubble check I just checked in, we can get rid of all the BF_SKIP_FOCUS_EVENT stuff. Bz?
Comment 15•22 years ago
|
||
Don't regress bug 17196.... And it's not clear what other problems that's "fixing". I would want rods to comment on that....
Comment 16•22 years ago
|
||
what am I suppose to comment on?
Comment 17•22 years ago
|
||
On whether the "skip focus event" boolean still serves a useful function in light of the change in this bug....
Comment 18•22 years ago
|
||
My patch was just intended to point out the duplication of code. I'll do more testing to make sure that I don't get any more events.
Comment 19•22 years ago
|
||
bz: the difference with my patch is that the onfocus event is generated when whichever of the inner textfield or button gets focus first; currenty the onfocus event is only generated when the button gets focus (tabbing forward; obviously tabbing backward always focuses the button first).
Comment 20•22 years ago
|
||
Ah.. That would be a consistency issue worth fixing...
Comment 21•22 years ago
|
||
Updated the "Removes the BF_SKIP_FOCUS_EVENT hack" patch for bitrot.
Attachment #104627 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #107891 -
Flags: superreview?(bryner)
Attachment #107891 -
Flags: review?(jkeiser)
Comment 22•22 years ago
|
||
is this fixed? should the bug be reopened for this last patch? If not then can you unset the review requests? thanks.
Comment 23•22 years ago
|
||
Reopening to fix focus events.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 24•22 years ago
|
||
Comment on attachment 107891 [details] [diff] [review] Fix focus event when tabbing into file textbox Yay, goodie. But one little thing off the bat: you should really decrement the other #defines if you are removing the 0th one. Or else put in a comment there saying // 0 unused - was BF_SKIP_FOCUS_EVENT So that people will realize that they can use that slot in the future. r=me otherwise though.
Attachment #107891 -
Flags: review?(jkeiser) → review+
Comment 25•22 years ago
|
||
Attachment #107891 -
Attachment is obsolete: true
Updated•22 years ago
|
Attachment #109526 -
Flags: superreview?(bryner)
Attachment #109526 -
Flags: review?(jkeiser)
Updated•22 years ago
|
Attachment #107891 -
Flags: superreview?(bryner)
Updated•22 years ago
|
Attachment #109526 -
Flags: review?(jkeiser) → review+
Updated•22 years ago
|
Attachment #109526 -
Flags: superreview?(bryner) → superreview+
Comment 26•22 years ago
|
||
Fix was checked in by timeless.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 27•5 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•