Closed
Bug 294208
Opened 20 years ago
Closed 20 years ago
FAYT shoudn't be blocked when a form button, checkbox or a radio element is focused
Categories
(Toolkit :: Find Toolbar, defect, P2)
Toolkit
Find Toolbar
Tracking
()
RESOLVED
FIXED
mozilla1.8final
People
(Reporter: asaf, Assigned: asaf)
References
Details
(Keywords: access)
Attachments
(1 file, 2 obsolete files)
|
1.71 KB,
patch
|
mconnor
:
review+
bzbarsky
:
superreview+
asa
:
approval-aviary1.1a2+
|
Details | Diff | Splinter Review |
The findbar implementaion blocks fayt whenever an <input> element is focused, this (also) includes buttons, radios and checkboxes which are a no-real-blocker to fayt. (FYI, it's a ff-only bug, the xpfe version seems to work fine ;) )
| Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → Firefox1.1
| Assignee | ||
Comment 1•20 years ago
|
||
Attachment #183612 -
Flags: review?(mconnor)
Updated•20 years ago
|
Summary: FAYT shoudn't be blocked when a from button, checkbox or a radio element is focused → FAYT shoudn't be blocked when a form button, checkbox or a radio element is focused
| Assignee | ||
Comment 2•20 years ago
|
||
Comment on attachment 183612 [details] [diff] [review] patch I should use the type property; thanks for pointing out, Gavin.
Attachment #183612 -
Flags: review?(mconnor)
| Assignee | ||
Comment 3•20 years ago
|
||
Attachment #183612 -
Attachment is obsolete: true
Attachment #183613 -
Flags: review?(mconnor)
Updated•20 years ago
|
Attachment #183613 -
Flags: review?(mconnor) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #183613 -
Flags: approval-aviary1.1a2?
Updated•20 years ago
|
Attachment #183613 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
| Assignee | ||
Comment 4•20 years ago
|
||
Checking in toolkit/components/typeaheadfind/content/findBar.js; /cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js,v <-- findBar.js new revision: 1.12; previous revision: 1.11 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 5•20 years ago
|
||
Er.. So this code changed from being wrong to being wrong. How about checking instanceof on the element instead of checking localname? <input> doesn't mean "HTML input" by any means.
Comment 6•20 years ago
|
||
well, wrong to less wrong.... but yeah, lets get a new patch doing the right thing....
| Assignee | ||
Updated•20 years ago
|
Status: RESOLVED → VERIFIED
| Assignee | ||
Updated•20 years ago
|
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 7•20 years ago
|
||
Attachment #183613 -
Attachment is obsolete: true
Attachment #185804 -
Flags: superreview?(bzbarsky)
Attachment #185804 -
Flags: review?(mconnor)
Comment 8•20 years ago
|
||
Comment on attachment 185804 [details] [diff] [review] v2 Looks ok, but maybe we should have a followup bug on having a saner way to do this (eg when we get editable SVG ideally we wouldn't have to change this code!)
Attachment #185804 -
Flags: superreview?(bzbarsky) → superreview+
Comment 9•20 years ago
|
||
Comment on attachment 185804 [details] [diff] [review] v2 r=me with the indenting in the switch fixed. Please do file the followup bz suggested though.
Attachment #185804 -
Flags: review?(mconnor) → review+
| Assignee | ||
Updated•20 years ago
|
Attachment #185804 -
Flags: approval-aviary1.1a2?
Updated•20 years ago
|
Attachment #185804 -
Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
| Assignee | ||
Comment 10•20 years ago
|
||
will do. Checking in findBar.js; /cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js,v <-- findBar.js new revision: 1.13; previous revision: 1.12 done
Status: REOPENED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
Comment 11•20 years ago
|
||
Comment on attachment 185804 [details] [diff] [review] v2 > var elt = document.commandDispatcher.focusedElement; > if (elt) { >+ if (elt instanceof HTMLInputElement) { >+ // block FAYT when an <input> textfield element is focused >+ var inputType = elt.type; >+ switch (inputType) { >+ case "text": >+ case "password": >+ case "file": >+ return false; >+ } > } File inputs don't actually take focus in the normal scheme of things. Instead you'll find that the .focusedElement is either the text or the button. They may be some way of giving the file input container the focus, but in that case I doubt it should block FAYT. An alternative way of checking for text/password inputs is to access the .controllers property which returns null for other types of inputs. I don't know if it would be possible to add the event listener to the system event group where it would fire after the input (or whichever) and hopefully be able to tell if the event had already been handled.
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•