Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if language menu is visible before setting element position #305

Open
siimha opened this issue Aug 30, 2018 · 0 comments
Open

Check if language menu is visible before setting element position #305

siimha opened this issue Aug 30, 2018 · 0 comments
Assignees
Labels

Comments

@siimha
Copy link
Contributor

siimha commented Aug 30, 2018

Kui lehel on ainult üks keel, siis avalikus vaates ei kuvata keele valikut ja JS läheb katki, kui üritab keelemenüüd paigutada. Kas kuvada keelemenüüd või mitte? Hetkel selline käitumine, et kui sul on lehel 2 keelt, millest 1 on peidetud, siis kuvatakse ja kui 1 keel, siis ei kuvata.

FIX:
var bindLanguageMenuPositioning = function(currentButton) { var offsetItem = $('html').hasClass('language-flags-disabled') ? currentButton.find('.js-lang-title-inner') : currentButton, rightOffsetHelper = $('html').hasClass('language-flags-disabled') ? 5 : 9, langMenuvisible = $('html').hasClass('js-popup-menu-popover');
if (langMenuvisible) { $('.js-popup-menu-popover').css({ top: offsetItem.offset().top + offsetItem.outerHeight() - $('.site-container').offset().top, right: $(window).width() - offsetItem.offset().left - offsetItem.outerWidth() - rightOffsetHelper }); } };

@siimha siimha self-assigned this Aug 30, 2018
@siimha siimha added the bug label Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant