Opened 12 years ago
Closed 8 years ago
#8709 closed enhancement (fixed)
Button: visual feedback absent when pressing via keyboard.
Reported by: | Joseph Scheuhammer | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.9 |
Component: | Dijit - LnF | Version: | 1.2.3 |
Keywords: | Cc: | Becky Gibson | |
Blocked By: | Blocking: |
Description
This is purely a visual feedback issue.
Using ".../dijit/tests/form/test_Button.html" as an example, if the mouse is used to press a button, the styles change to show the button as first depressed and then released.
If either a SPACE or ENTER/RETURN keystroke is used, the button does not change its appearance. The behaviour is as expected in that the correct handlers are executed.
This is unlike native buttons where the pressed/released appearance is the same when using either the mouse or keyboard to activate the button.
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
I've thought about this too.... maybe handle keydown and keyup, similar to mousedown and mouseup, although typicially people don't hold down the space/enter keys for any length of time.
comment:3 Changed 12 years ago by
Component: | Dijit → Dijit - LnF |
---|
comment:4 Changed 12 years ago by
Milestone: | tbd → future |
---|
comment:5 Changed 8 years ago by
Milestone: | future → 1.9 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Looking at
_FormWidget.js
, the method used to style pressed/released is_setStateClass()
. Specifically,_onMouse()
sets the_active
state to 'true' for onmousedown, and then calls_setStateClass()
.Something similar needs to be done for SPACE and/or ENTER. It's not clear how to wire this up, though.