Opened 10 years ago
Closed 10 years ago
#16292 closed defect (fixed)
item passed in event differs between Mouse and Touch for dojos/calendar/Calendar
Reported by: | sgevers | Owned by: | cjolif |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.2 |
Component: | Dojox | Version: | 1.8.1 |
Keywords: | Cc: | dg | |
Blocked By: | Blocking: |
Description
The item passed to the onItemClick event from the Touch mixin does not contain the same properties as the one passed from the Mouse mixin. Looking at the source, the Mouse mixin uses the function renderItemToItem function to create the item that is passed to the event handler (Mouse.js: line 63). The Touch mixin uses itemToRenderItem to create the item that is passed to the event handler (Touch.js: line 317). The latter function appears to be intended for display purposes and does not contain all of the properties found on the original item in the store.
I'm attaching an example. The CalendarBug?.js file is a copy of dojox/calendar/Calendar.js with Touch added to the set of base classes mixed in at line 32. Cal.js is a simple widget that creates an instance of CalendarBug? and adds a handler for itemClicked. The calendar is created with a Memory store that contains one item. The one item has a property named "extraInfo". The handler simply creates an alert that shows the value of the item's extraInfo property.
When this example is run on a desktop browser, and the item is clicked, the alert contains the string "extraInfo" (which is the value of the extraInfo property). When run on a mobile device, the alert contains "undefined"
Attachments (3)
Change History (7)
Changed 10 years ago by
Changed 10 years ago by
Attachment: | CalendarBug.js added |
---|
dojox/calendar/Calendar with Touch mixed in
comment:1 Changed 10 years ago by
Owner: | changed from Adam Peller to cjolif |
---|---|
Status: | new → assigned |
comment:2 Changed 10 years ago by
Cc: | dg added |
---|
comment:3 Changed 10 years ago by
Milestone: | tbd → 1.8.2 |
---|
This is https://github.com/damiengarbarino/dojo-calendar/issues/45
This has been fixed.
comment:4 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
HTML for example