<commit_before>---
title: Close Popup Directive
desc: Helper Vue directing when working with QDialog or QMenu.
related:
  - /vue-components/dialog
  - /vue-components/menu
---

This directive is a helper when dealing with [QDialog](/vue-components/dialog) and [QMenu](/vue-components/menu) components. When attached to a DOM element or component then that component will close the QDialog or QMenu (whichever is first parent) when clicked/tapped.

## Installation

<doc-installation directives="ClosePopup" />

## Usage<commit_msg>fix(docs): fix terminology : directing => directive<commit_after>---
title: Close Popup Directive
desc: Helper Vue directive when working with QDialog or QMenu.
related:
  - /vue-components/dialog
  - /vue-components/menu
---

This directive is a helper when dealing with [QDialog](/vue-components/dialog) and [QMenu](/vue-components/menu) components. When attached to a DOM element or component then that component will close the QDialog or QMenu (whichever is first parent) when clicked/tapped.

## Installation

<doc-installation directives="ClosePopup" />

## Usage
{'fraction_non_alphanumeric': 0.09818181818181818, 'fraction_numerical': 0.0, 'mean_word_length': 4.532663316582915, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6636733', 'n_tokens_mistral': 315, 'n_tokens_neox': 303, 'n_words': 117}