Skip to content

Commit 3a304b4

Browse files
author
Chris Hawes
committed
Fix baCloseAll with nested elements
Fix issue where, when using baCloseAll, clicking on a nested element within a baOpen/baClose/baToggle element would not open the thing it was supposed to open. When checking for a click on such an element, check the element’s ancestry as well.
1 parent 745d207 commit 3a304b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

js/angular/components/common/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203

204204
// check if clicked target is designated to open/close another component
205205
avoid = ['ba-toggle', 'ba-hard-toggle', 'ba-open', 'ba-close'].filter(function(e){
206-
return e in tar.attributes;
206+
return tar.closest('*[' + e + ']') !== null;
207207
});
208208
if(avoid.length > 0) {
209209
// do nothing

0 commit comments

Comments
 (0)