ix
ix copied to clipboard
Clicking a entry in a dropdown, also triggers a click in the backdrop
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 {
}
Cannot reproduce this issue https://stackblitz.com/edit/uo4ucs-xcdfpm?file=src%2Fapp%2Fdropdown.ts
As this is a duplicate of #1229, this issue will be closed and further be discussed there.