Auto close pulldowns on outside click

This commit is contained in:
Björn Fromme
2023-01-26 17:18:51 +01:00
parent bce550a8a7
commit 66837ec41d
4 changed files with 4 additions and 4 deletions
@@ -1,5 +1,5 @@
<template> <template>
<div class="relative"> <div class="relative" tabindex="0" @focusout="visible = false">
<button class="button bg-button button--small w-full" <button class="button bg-button button--small w-full"
type="button" type="button"
@click.prevent="visible = !visible"> @click.prevent="visible = !visible">
@@ -1,5 +1,5 @@
<template> <template>
<div class="relative" v-if="hasSelectedRentals"> <div class="relative" v-if="hasSelectedRentals" tabindex="0" @focusout="visible = false">
<button class="button bg-button button--small" @click.prevent="visible = !visible"> <button class="button bg-button button--small" @click.prevent="visible = !visible">
<span> <span>
Größen Größen
@@ -1,5 +1,5 @@
<template> <template>
<div class="relative"> <div class="relative" tabindex="0" @focusout="visible = false">
<button class="button bg-button button--small" @click.prevent="visible = !visible"> <button class="button bg-button button--small" @click.prevent="visible = !visible">
<span> <span>
Zustieg Zustieg
@@ -1,5 +1,5 @@
<template> <template>
<div class="relative" v-if="hasServices"> <div class="relative" v-if="hasServices" tabindex="0" @focusout="visible = false">
<button class="button bg-button button--small" type="button" @click.prevent="visible = !visible"> <button class="button bg-button button--small" type="button" @click.prevent="visible = !visible">
<span> <span>
{{ subType.label }} {{ subType.label }}