Opened 15 years ago

Last modified 15 years ago

#3350 closed task

FormElement generalized code for mouse and CSS class management — at Version 2

Reported by: bill Owned by: bill
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Need library code to handle mouse events, setting appropriate flags on the widget:

  • hover - mouse is over the widget
  • active - mouse button is being pressed down

Widget also has other flags that aren't directly related to mouse movement:

  • disabled
  • selected - if a checkbox is checked, or a tab is selected, etc.

Also need a function to set a single CSS class for the widget depending on the state variables above.

Classes for button:

  • buttonDisabled
  • buttonHover
  • buttonActive

Classes for checkbox with no check mark:

  • checkboxDisabled
  • checkboxHover - mouse over checkbox but not pressing buttons
  • checkboxActive - between mouse down and mouse up

and parallel classes for when the box is checked:

  • checkboxSelectedDisabled
  • checkboxSelectedHover
  • checkboxSelectedActive

A widget like Combobox needs to have separate CSS class names for when the mouse is over the input vs when it's over the down arrow.

  • comboboxDisabled
  • comboboxHover - mouse over checkbox but not pressing buttons
  • comboboxActive - between mouse down and mouse up

and parallel classes for when the box is checked:

  • comboboxDownArrowHover
  • checkboxDownArrowActive

Still talking w/Owen to finalize this plan.

Change History (2)

comment:1 Changed 15 years ago by bill

Status: newassigned

comment:2 Changed 15 years ago by bill

Description: modified (diff)
Note: See TracTickets for help on using tickets.