@binary-com/binary-style
Advanced tools
Comparing version 0.2.6 to 0.2.7
{ | ||
"name": "@binary-com/binary-style", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "Style system and guide for Binary.com", | ||
@@ -5,0 +5,0 @@ "main": "binary.js", |
@@ -215,11 +215,2 @@ /* | ||
}); | ||
// collapse dropdown when clicking outside | ||
$(document).click((e) => { | ||
if ((!$list_items.is(e.target) && !$list_items.has(e.target).length) | ||
&& $select_dropdown.hasClass('show')) { | ||
$select_dropdown.removeClass('show'); | ||
removeActiveClasses(); | ||
} | ||
}); | ||
}; | ||
@@ -273,2 +264,3 @@ | ||
export function documentListener() { | ||
const select_els = document.getElementsByClassName('select-dropdown'); | ||
$(document).on('click', () => { | ||
@@ -278,2 +270,10 @@ hide_menu($('#all-accounts, #all-accounts-top')); | ||
hide_menu($('#language_select, #select_language')); | ||
if (select_els.length && select_els.length > 0) { | ||
// collapse dropdowns when clicking outside | ||
Array.from(select_els).forEach(el => { | ||
if ($(el).hasClass('show') || $(el).hasClass('focused')) { | ||
$(el).removeClass('show focused'); | ||
} | ||
}); | ||
} | ||
}); | ||
@@ -280,0 +280,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2330501
7880