Commit 7b32190d authored by Simonas's avatar Simonas

Small bugs fix

parent 777ca6be
......@@ -12,7 +12,7 @@
padding-bottom: 50px;
}
@media (--min--medium) {
flex: 0 0 400px; padding: 70px 40px;
flex: 0 0 400px; padding: 70px 40px; max-width: 400px;
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -19,6 +19,7 @@ const autocomplete = (str) => {
const clear = document.querySelector('.js-clear--' + str);
let isOpen = false;
let isClosed = false;
const update = (langID, target, str, hidden) => {
const type = (target.id === 'search-city') ? 'query' : 'city';
......@@ -97,12 +98,13 @@ const autocomplete = (str) => {
});
node.addEventListener('focus', () => {
if (box.ul.childNodes.length === 0 || box.ul.hasAttribute('hidden')) {
if (!isOpen && (box.ul.childNodes.length === 0 || box.ul.hasAttribute('hidden'))) {
toggle(true);
box.evaluate();
} else {
toggle(false);
box.close();
node.blur();
}
});
......@@ -136,7 +138,7 @@ const autocomplete = (str) => {
});
if (arrow) {
arrow.addEventListener('click', () => {
arrow.addEventListener('click', (e) => {
if (!isOpen) {
node.focus();
} else {
......
......@@ -92,7 +92,7 @@
/******/
/******/ var hotApplyOnUpdate = true;
/******/ // eslint-disable-next-line no-unused-vars
/******/ var hotCurrentHash = "297196b8612ef6440284";
/******/ var hotCurrentHash = "0115a90eb0eff9676988";
/******/ var hotRequestTimeout = 10000;
/******/ var hotCurrentModuleData = {};
/******/ var hotCurrentChildModule;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment