Hey,
I'm using Enyo for webdialogs in Trimble SketchUp. These are used as configuration dialogs for our SketchUp plugin. The dialogs have "apply" buttons to apply the changed settings. I've programmed them such that the settings are also applied when pressing the Enter key while one of the input fields has focus. In that case I want to give the users a visual cue by making the apply button go down when Enter is pressed down and making it go up again when Enter is released.
What I've done so far is this:
Call
ApplyButton.addClass("active")
when Enter is pressed and
ApplyButton.removeClass("active")
when Enter is released.
This changes the button's gradient correctly but doesn't move the button's text.
Is there another class that I have to add or am I doing it wrong?

What exactly happens when the mouse button is clicked on a button? What mechanism determines the appearance of the button? I'm not very experienced with web programming, so please excuse my ignorance. Thanks!
Comments
For Onyx, adding the active or pressed class is the right way to show this. I don't see anything in the stylesheets that affects the test, and just testing in the sampler didn't show any text movement.
I think I can live with this, but I'm still wondering why there's a difference between clicking the button and adding the class.