nextcloud-libraries / nextcloud-libraries/nextcloud-vue

[NcActions] 'closed' event is not emmited in v9

Open
#8,200 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
246
Forks
99
Avg merge
1d 20h
Merged PRs (30d)
103

Description

The closed event is not emitted when the popover menu created by NcActions is closed.

Steps to Reproduce

Given the following setup:

<template>
  <NcActions @close="showMessage('Close')" @closed="showMessage('Closed')">
    <NcActionButton @click="showMessage('Edit')"> Edit </NcActionButton>
    <NcActionButton @click="showMessage('Delete')">Delete </NcActionButton>
  </NcActions>
</template>
<script>
export default {
  methods: {
    showMessage(msg) {
      alert(msg);
    },
  },
};
</script>
  1. Click on the menu indicator to open the popover
  2. Click outside the popover to close it
  3. (Observe the close event being emitted in v8 and v9)
  4. Observe the closed event
    • being emitted in v8
    • not being emitted in v9

Actual Behavior

closed event is not emitted in v9.

Expected Behavior

closed event being emitted.

Environment

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the NcActions component and its popover close handling, then compare the v9 behavior with the v8 implementation or the linked reproduction. Verify that clicking outside the popover emits both close and closed, and confirm the fix with the provided Vue example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.