Last Comment Bug 303865 - a11y: Should be able to select items in select1 via keypressed (not arrow keys)
: a11y: Should be able to select items in select1 via keypressed (not arrow keys)
Status: RESOLVED FIXED
: fixed1.8.0.8, fixed1.8.1.1
Product: Core
Classification: Components
Component: XForms (show other bugs)
: Trunk
: All All
: -- enhancement (vote)
: ---
Assigned To: alexander :surkov
: Stephen Pride
Mentors:
http://www.mozilla.org/projects/xforms/
: 316618 (view as bug list)
Depends on:
Blocks: 326372 326373 xformsa11y
  Show dependency treegraph
 
Reported: 2005-08-08 01:28 PDT by Allan Beaufour
Modified: 2007-01-11 15:54 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (3.30 KB, application/xhtml+xml)
2006-09-05 11:23 PDT, alexander :surkov
no flags Details
patch (4.33 KB, patch)
2006-09-05 11:24 PDT, alexander :surkov
bugs: review-
Details | Diff | Review
patch2 (4.31 KB, patch)
2006-09-07 07:35 PDT, alexander :surkov
bugs: review+
aaronr: review+
Details | Diff | Review

Description Allan Beaufour 2005-08-08 01:28:37 PDT
Pressing f.x. "v" in a select1 should select the first element starting with a
"v", as a html:select does. Try f.x. attachment 190005 [details].
Comment 1 aaronr 2005-11-16 09:16:55 PST
*** Bug 316618 has been marked as a duplicate of this bug. ***
Comment 2 aaronr 2005-11-16 09:18:15 PST
Also, if you type out a value, that value should be selected.
Comment 3 alexander :surkov 2006-09-05 11:23:32 PDT
Created attachment 236825 [details]
testcase
Comment 4 alexander :surkov 2006-09-05 11:24:15 PDT
Created attachment 236826 [details] [diff] [review]
patch
Comment 5 alexander :surkov 2006-09-05 11:46:30 PDT
<method name="selectItemByLabel">
  <parameter name="aValue"/>
  <parameter name="aContextNode"/>

Last parameter is needless. Costs of testing :)
Comment 6 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2006-09-07 02:36:20 PDT
Comment on attachment 236826 [details] [diff] [review]
patch


>+            } else if (aEvent.charCode && !this.selectionOpen) {
>+              // Cache sequence of last pressed keys and search it in value of
>+              // xforms:label inside xforms:item elements.
>+              this.searchedHitCount++;
>+              window.setTimeout(
>+                function(aSelect) {
>+                  if (!--aSelect.searchidHitCount)
>+                    aSelect.searchedValue = "";
>+                },
>+                1000,
>+                this);

Why this timeout is needed? If you have a good reason, add a comment to the code too ;)
And why the timeout is 1sec?
Comment 7 alexander :surkov 2006-09-07 07:35:41 PDT
Created attachment 237125 [details] [diff] [review]
patch2

(In reply to comment #6)
> 
> Why this timeout is needed? If you have a good reason, add a comment to the
> code too ;)
> And why the timeout is 1sec?
> 

Right, timeout is not needed. 1 sec is time of html:select http://lxr.mozilla.org/seamonkey/source/layout/forms/nsListControlFrame.cpp#105
Comment 8 alexander :surkov 2006-09-12 07:17:28 PDT
checked in by smaug for me
Comment 9 aaronr 2006-10-17 14:28:41 PDT
checked into 1.8.0 branch on 2006/09/21
Comment 10 aaronr 2007-01-11 15:54:43 PST
checked into 1.8 branch on 2006/11/21

Note You need to log in before you can comment on or make changes to this bug.