Dojo Cannot Read Property 'on' of null

344
1
Jump to solution
06-25-2019 08:07 AM
ShawnRoberts1
Occasional Contributor

I've got an interesting one I've been trying to figure out, but having no luck. Hopefully someone else can shed some light.

I've got a little chunk of code that is watching for a button click on a popup. When it's clicked it fires a function. It works great on a desktop, however I'm finding on mobile devices/tablets i'm getting the Cannot read property'on' of null error. 

I imagine I'm just missing something in the require, or something silly but it's a bit of a mystery to me at this point.

This is the code. It's just the view watching for a click on the "viewDetailsPopupButton", which ,of course ,is embedded in a popup. The error is obviously firing on the "on(dom.byId...)" . I'm just not sure why dom.byID is null? 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any guesses, or help would be very much appreciated!
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ShawnRoberts1
Occasional Contributor

Fixed my own problem.

Callbacks and requires were in the wrong order. 

View solution in original post

0 Kudos
1 Reply
ShawnRoberts1
Occasional Contributor

Fixed my own problem.

Callbacks and requires were in the wrong order. 

View solution in original post

0 Kudos