Opened 6 years ago

Last modified 3 years ago

#17494 new defect

on.emit raises TypeError in button option supplied

Reported by: PeterWAWood Owned by: dylan
Priority: undecided Milestone: 1.15
Component: Events Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:

Description

I am trying to synthesise a right-click on an image so that the browser's standard image context-menu is displayed. (I realise that this may not be possible due to browsers not processing the button option in the onclick event).

During my experiments, a Type Error was raised within Dojo. My code and the console output follows.

Code

console.log(dom.byId("curImg_dom"));
on.emit("curImg_dom", "click", {
  bubbles: true,
  cancellable: false,
  button: 2
});

<img src=​"data:​image/​png;​base64,iVBOR…ABQABDQottAAAAABJRU5ErkJggg==" width=​"676" height=​"380" id=​"curImg_dom" style=​"background-image:​ url(http:​/​/​localhost/​iBEAM/​webpages/​results/​cameras/​B0343CBC95994E9684/​images/​full-size/​2013100421170000.jpg)​;​ background-size:​ 676px 380px;​ background-position:​ 0px 0px;​ background-repeat:​ no-repeat no-repeat;​">​
Uncaught TypeError: Cannot use 'in' operator to search for 'parentNode' in curImg_dom         ...... dojo.js.uncompressed.js:15602
l.emit ....... dojo.js.uncompressed.js:15602
l.emit ....... dojo.js.uncompressed.js:15665
showDownloadImage
onclick

Change History (2)

comment:1 Changed 3 years ago by dylan

Component: CoreEvents
Milestone: tbd1.12
Owner: set to dylan

comment:2 Changed 3 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.