Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
fix: selecting SmartTrader should close the dropdown (deriv-com#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-deriv authored Jan 16, 2023
1 parent f12c0fc commit 24f6f46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/javascript/app/base/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ const Header = (() => {
setHeaderUrls();
BinarySocket.wait('authorize','landing_company').then(() => {
bindPlatform();
bindClick();
bindSvg();
});
bindClick();
bindSvg();
if (Client.isLoggedIn()) {
displayAccountStatus();
}
Expand Down Expand Up @@ -305,6 +305,7 @@ const Header = (() => {
const platform_dropdown = getElementById('platform__dropdown');
const platform__list = getElementById('platform__list');
const platform_dropdown_active = 'platform__dropdown--show';

const showPlatformSwitcher = (should_open) => {
if (should_open) {
platform_dropdown.classList.add(platform_dropdown_active);
Expand All @@ -320,6 +321,7 @@ const Header = (() => {
applyToAllElements('.platform__list-item', (el) => {
el.addEventListener('click', () => {
showPlatformSwitcher(false);
showMobileMenu(false);
});
});

Expand Down

0 comments on commit 24f6f46

Please sign in to comment.