Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#12250 closed defect (fixed)

Support touch events in dijit._CssStateMixin

Reported by: mgottli Owned by: evan
Priority: high Milestone: 1.7
Component: Dijit Version: 1.6.0b1
Keywords: 1.7-mobile Cc: Evan
Blocked By: Blocking:


It would be nice to update dijit._CssStateMixin to support the touch events for iPad, etc. This would be pretty easy to do and then the dojo buttons would behave better on touch devices.

Attachments (1)

_CssStateMixin.js (12.4 KB) - added by mgottli 11 years ago.
Updated to support touch events so styles are properly applied on dijit.form.Button on the iPad

Download all attachments as: .zip

Change History (11)

Changed 11 years ago by mgottli

Attachment: _CssStateMixin.js added

Updated to support touch events so styles are properly applied on dijit.form.Button on the iPad

comment:1 Changed 11 years ago by bill

Component: GeneralDijit
Milestone: tbd1.7
Owner: changed from anonymous to bill
Status: newassigned

Thanks for the patch. Some devices have both mouse and touch so it shouldn't be either/or, but rather and/or.

Oh also, can you attach patches in patch file format?

BTW long term I wanted to use the :active pseudo-selector in our CSS files, but it doesn't seem to works for touch events?

comment:2 Changed 11 years ago by bill

Cc: evan added

May get this support automatically after Evan's dojo.touch work.

comment:3 Changed 11 years ago by bill

Keywords: 1.7-mobile added

comment:4 Changed 11 years ago by bill

Owner: changed from bill to evan
Status: assignednew

Evan, you had patches to update dijit for touch support, right? So assigning this one to you.

comment:5 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed

(In [25151]) Fixes for dijit widgets on mobile:

  • clicking blank area of screen to close dropdown
  • clicking arrow icon to open dropdown for DateTextBox/ComboBox/etc.
  • dragging BorderContainer splitter
  • clicking slider bar to adjust slider value
  • CSS active effect when pressing button

Unresolved mobile issues:

  • have to click twice to close menu (first click doesn't even generate an onclick event, not sure why)
  • opening TooltipDialog/Dialog/InlineEditBox doesn't focus [first] field
  • Dialog position doesn't readjust when keyboard opened or phone orientation changed (portrait to landscape)


  • use dojo.touch.* rather than mousexxx events
  • added press, move, release options for dojoAttachEvent, ex: dojoAttachEvent="press: _onMouseDown", that correspond to dojo.touch events
  • remove e.touches[] normalization code since that's now handled by dojo/on.

Not adjusting:

  • Editor since that has many issues on mobile.
  • deprecated SplitContainer widget

Refs #12934, fixes #12250 !strict

comment:6 Changed 11 years ago by Evan

Cc: Evan added; evan removed

comment:7 Changed 10 years ago by bill

In [28234]:

Remove unnneeded require() of dojo/touch, and fix event names. Can't use dojo/touch because _CssStateMixin uses addEventListener()/attachEvent() rather than dojo/on. Refs #12250 !strict.

comment:8 Changed 10 years ago by bill

In [28854]:

fix typo in test, refs #12250

comment:9 Changed 10 years ago by bill

In [29196]:

remove strange character (typo), refs #12250

comment:10 Changed 7 years ago by Bill Keese <[email protected]…>

In 548ba569dea1db38363fc0ebe7b445ff7a933053/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.