Skip to content

Commit

Permalink
fix(form): use namespace to be able to destroy events
Browse files Browse the repository at this point in the history
Some form events were not detroyable because attached namespace was missing which leads into memory leaks
  • Loading branch information
lubber-de committed Feb 19, 2023
1 parent dc85362 commit 72d102a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/definitions/behaviors/form.js
Expand Up @@ -170,7 +170,11 @@
$(window).on('beforeunload' + eventNamespace, module.event.beforeUnload);
}

$field.on('change click keyup keydown blur', function (e) {
$field.on('change' + eventNamespace
+ ' click' + eventNamespace
+ ' keyup' + eventNamespace
+ ' keydown' + eventNamespace
+ ' blur' + eventNamespace, function (e) {
module.determine.isDirty();
});

Expand Down

0 comments on commit 72d102a

Please sign in to comment.