MDL-72449 core: Fix show_confirm_dialog submission

The show_confirm_dialog function was passing a YUI Node object instead of
a DOM Node, which the form change checker is unable to handle.
This commit is contained in:
Andrew Nicols 2021-09-21 10:09:59 +08:00
parent 5ea3545115
commit dc3ecef948

View File

@ -294,12 +294,12 @@ M.util.show_confirm_dialog = function(e, args) {
if (target.get('name') && target.get('value')) {
targetform.append('<input type="hidden" name="' + target.get('name') +
'" value="' + target.get('value') + '">');
FormChangeChecker.markFormAsDirty(targetform);
FormChangeChecker.markFormAsDirty(targetform.getDOMNode());
}
targetform.submit();
} else if (target.test('form')) {
FormChangeChecker.markFormAsDirty(target);
FormChangeChecker.markFormAsDirty(target.getDOMNode());
target.submit();
} else {