Event Handlers Not Firing

I’m having trouble getting JavaScript event handlers to work properly in Pinegrow, but they work fine when I view the site in a web browser. I’ve checked that my JavaScript files are linked correctly and tried both inline and external scripts. Simple click events aren’t even firing in the Pinegrow preview.
Its frustrating :pensive: :pensive:

Is this a known issue with Pinegrow’s preview mode, or could I be missing a step in my setup?

If you are using an external script, then try debugging (breakpoints) the click event via the devtools.

You can open the devtools by right clicking on the pinegrow icon (top left) > Inspect, or keyboard shortcut cmd/ctrl+shift+c.

Also, the devtools will log an error if there was an issue with the script src. Can you share your script tag.

A more basic approach,
have you enabled Test Clicks?

By clicking the icon as shown or via shortcuts listed here.

as

ALT + click, Test click (on page) or select element if Test clicks are enabled (icon highlighted in green.)

1 Like