[SalesForce] Issue with lightning locker service and jQuery static resource

I get the following error when attempting to use a lightning component (previously working with Spring 16) in a Summer 16 pre-release org, presumably because of the new locker service:

"Uncaught Error: Unable to create locker IIFE: TypeError: Cannot read property 'onsubmit' of undefined
throws at https://nojvsum16-dev-ed.lightning.force.com/auraFW/javascript/JXhCgmQ-0R9LYjekEJHc9w/aura_prod.js:1:27"

The component has ltng:require commands to include jquery, jquery-ui and other javascript and css resources, but only the css gets loaded.

How can I get past this error? Is it still possible to make use of jquery libraries?

Best Answer

Please see my answer/comments here Unable to use SVG in Lightning Components with LockerService activated for related info.

During the prerelease phase of Summer'16 we are actively dialing in what is exposed via LockerService's secure virtual DOM.

Specifically the onsubmit issue you are seeing has been addressed in the .3 patch scheduled to deploy to prerelease environments next week (Tuesday/Wednesday if things stay on schedule).

Related Topic