Permalink
Browse files

MDL-33874 Don't warn about focussed form fields with the ignoredirty …

…class
  • Loading branch information...
andrewnicols committed Jul 16, 2012
1 parent 52dc017 commit 35ee7758822387dea3f6359b037f0550d7b799d1
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/yui/formchangechecker/formchangechecker.js
@@ -43,6 +43,10 @@ YUI.add('moodle-core-formchangechecker',
* get_form_dirty_state function later.
*/
store_initial_value : function(e) {
+ if (e.target.hasClass('ignoredirty')) {
+ // Don't warn on elements with the ignoredirty class
+ return;
+ }
if (M.core_formchangechecker.get_form_dirty_state()) {
// Clear the store_initial_value listeners as the form is already dirty so
// we no longer need to call this function

0 comments on commit 35ee775

Please sign in to comment.