Permalink
Browse files

MDL-30660 javascript-static: another yui3/ticket/2531561 work-around.

  • Loading branch information...
1 parent 2876f41 commit 96cd18c26188557b264b99e1d5bf7a32f183e6fb @timhunt timhunt committed with stronk7 Dec 9, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/javascript-static.js
View
4 lib/javascript-static.js
@@ -268,7 +268,9 @@ M.util.show_confirm_dialog = function(e, args) {
window.location = targetancestor.get('href');
} else if (target.test('input')) {
- targetform = target.ancestor('form');
+ targetform = target.ancestor(function(node) { return node.get('tagName').toLowerCase() == 'form'; });
+ // We cannot use target.ancestor('form') on the previous line
+ // because of http://yuilibrary.com/projects/yui3/ticket/2531561
if (!targetform) {
return;
}

0 comments on commit 96cd18c

Please sign in to comment.