add: toggle input by a click on logo
For mobile keyoard experience
This commit is contained in:
parent
7b49db4fb4
commit
5c84fe7feb
|
@ -659,3 +659,17 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.addEventListener("load", () => {
|
||||||
|
document.querySelector('#logo').addEventListener('click', () => {
|
||||||
|
if(document.querySelector('search-component').shadowRoot.querySelector('.dialog').open) {
|
||||||
|
document.querySelector('search-component').shadowRoot.querySelector('.dialog').close();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
document.querySelector('search-component').shadowRoot.querySelector('.dialog').show();
|
||||||
|
document.querySelector('search-component').shadowRoot.querySelector('.input').focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue