ix icon indicating copy to clipboard operation
ix copied to clipboard

Clicking a entry in a dropdown, also triggers a click in the backdrop

Open Stefei opened this issue 10 months ago • 1 comments

Prerequisites

  • [X] I have read the Contributing Guidelines.
  • [X] I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

Clicking a entry in a dropdown, will also trigger a click in the backdrop. This is a problem for us, because we use a modal that closes if the user clicks outside of the modal bounds.

What type of frontend framework are you seeing the problem on?

Angular, JavaScript

Which version of iX do you use?

v2.1.0

Code to produce this issue.

import { Component } from '@angular/core';

@Component({
  selector: 'app-example',
  template: `
    <div style="background-color:#ffffff; height: 1000px" onclick="console.log('backdrop clicked')">
    <ix-button #trigger>Open</ix-button>
    <ix-dropdown [ixDropdownTrigger]="trigger">
      <ix-dropdown-header label="Category"></ix-dropdown-header>
      <ix-dropdown-item label="Item 2"></ix-dropdown-item>
      <ix-dropdown-item label="Item 3"></ix-dropdown-item>
      <ix-dropdown-item label="Item 4"></ix-dropdown-item>
      <ix-divider></ix-divider>
      <ix-dropdown-item label="Item 5"></ix-dropdown-item>
    </ix-dropdown>
    </div>
  `,
})
export default class Dropdown {
}

Stefei avatar Apr 17 '24 07:04 Stefei

Cannot reproduce this issue https://stackblitz.com/edit/uo4ucs-xcdfpm?file=src%2Fapp%2Fdropdown.ts

Screen Recording 2024-05-06 at 08 08 14

danielleroux avatar May 06 '24 06:05 danielleroux

As this is a duplicate of #1229, this issue will be closed and further be discussed there.

matthiashader avatar May 08 '24 12:05 matthiashader